[Stackless] tasklet sleep()

Andrew Tutt tutt.andrew at gmail.com
Tue Aug 2 16:54:41 CEST 2011


As I've noted elsewhere, all sleep() functions in stackless are inherently
busy sleep because they are being continuously rerouted to the scheduler.
You can reduce the business by putting all the sleeping tasklets into a
single continuously scheduled function, but you cannot eliminate the fact
that at least one function is going to be constantly scheduled and
rescheduled to check that there are no tasklets to wake at any given time.

This is because all the program execution happens on one thread. It's not
necessarily a terrible thing, but it is an interesting fact. That's why I
like to call it a "wait()" function as opposed to sleep, since the CPU is
still jamming when you're supposed to be "sleeping"

- Andrew

On Tue, Aug 2, 2011 at 10:42 AM, John Matthew <john at compunique.com> wrote:

> Not sure if you're aware Richard, but you sent us to the Chinese Google
> site.
>
>
> On Mon, Aug 1, 2011 at 4:39 PM, Richard Tew <richard.m.tew at gmail.com>wrote:
>
>> On Tue, Aug 2, 2011 at 5:34 AM, Fernando Miranda <fcmiranda at gmail.com>
>> wrote:
>> > Hi there, I'm wondering which is the best way to implement a sleeping
>> > function in a tasklet without block the task pipeline. Any ideas?
>>
>>
>> http://www.google.com.hk/search?sourceid=chrome&ie=UTF-8&q=stackless+tasklet+sleep
>>
>> The first couple of links tell you everything you need to know.
>>
>> Cheers,
>> Richard.
>>
>> _______________________________________________
>> Stackless mailing list
>> Stackless at stackless.com
>> http://www.stackless.com/mailman/listinfo/stackless
>>
>
>
> _______________________________________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless
>



-- 
Andrew Tutt
Columbia Law School
J.D. Candidate 2013
B.S. Duke University 2009
919-699-5905
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20110802/e39c6d39/attachment.html>


More information about the Stackless mailing list