Re: Question on asyncio

2015-02-23 Thread Jonas Wielicki
On 23.02.2015 14:27, Marko Rauhamaa wrote: > pfranke...@gmail.com: >> The corresponding call is a call to the python smbus library. It >> includes several sleeps (even though they are only about 50ms). >> Therefore I think it is worthwhile to encapsulate it into a coroutine. > > Maybe. Then you'll

Re: Question on asyncio

2015-02-23 Thread Marko Rauhamaa
pfranke...@gmail.com: > Hello Marko! > > Am Sonntag, 22. Februar 2015 22:21:55 UTC+1 schrieb Marko Rauhamaa: >> In asyncio, you typically ignore the value returned by yield. While >> generators use yield to communicate results to the calling program, >> coroutines use yield only as a "trick" to im

Re: Question on asyncio

2015-02-23 Thread pfranken85
Hello Marko! Am Sonntag, 22. Februar 2015 22:21:55 UTC+1 schrieb Marko Rauhamaa: > In asyncio, you typically ignore the value returned by yield. While > generators use yield to communicate results to the calling program, > coroutines use yield only as a "trick" to implement cooperative > multitask

Re: Question on asyncio

2015-02-22 Thread Marko Rauhamaa
pfranke...@gmail.com: > I have some functions which are reading values from hardware. If one > of the values changes, I want a corresponding notification to the > connected clients. The network part shouldn't be the problem. Here is > what I got so far: > > @asyncio.coroutine > def check(): > ol

Question on asyncio

2015-02-22 Thread pfranken85
Hello! I am just trying to get familiar with asyncio. It seems to be a good thing, however, I am still having troubles and feel pretty puzzled although I think I got the point what async IO means. This is the problem I am trying to accomplish: I have some functions which are reading values fro