Re: [Vala] Question about a basic coroutine example

2011-07-07 Thread Luca Bruno
On Thu, Jul 07, 2011 at 09:35:41PM +0200, Serge Hulne wrote: In the snippet hereunder, I expected the respective value of the argument of the sleep() method, in the methods foo0() and foo1(), to have an influence on which one of said coroutines completes first. Apparently it is not the

Re: [Vala] Question about a basic coroutine example

2011-07-07 Thread Luca Dionisi
On Thu, Jul 7, 2011 at 9:35 PM, Serge Hulne serge.hu...@gmail.com wrote: In the snippet hereunder, I  expected the respective value of the argument of the sleep() method, in the methods foo0() and foo1(), to have an influence on which one of said coroutines completes first. There are 2 flaws

Re: [Vala] Question about a basic coroutine example

2011-07-07 Thread Jürg Billeter
On Thu, 2011-07-07 at 22:23 +0200, Luca Dionisi wrote: 2. The sleep function from posix, tells the O.S. to put to sleep the entire process, not just one function. If you want a function similar to sleep that acts in a cooperative manner you should create a function that goes something like