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 <[email protected]> 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 <[email protected]>wrote: > >> On Tue, Aug 2, 2011 at 5:34 AM, Fernando Miranda <[email protected]> >> 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 >> [email protected] >> http://www.stackless.com/mailman/listinfo/stackless >> > > > _______________________________________________ > Stackless mailing list > [email protected] > http://www.stackless.com/mailman/listinfo/stackless > -- Andrew Tutt Columbia Law School J.D. Candidate 2013 B.S. Duke University 2009 919-699-5905
_______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
