> > It polls just by being in the normal queue, it always runs, and yes it > is basically doing the same thing as your > >> > while (time.time() < timeStart + 2): > >> > stackless.schedule() > example, but since it is the *only* one doing it, I can have as many > tasklets as I want waiting while it handles all timekeeping. When I > add a tasklet to the timekeeper internal queue, just sort it based on > time then a simple comparison each loop is perfect. > > I think the eve demo code had such an example actually now that I think of > it. >
Ok, it does make much more sense to only have a single tasklet polling for the time. And also will have to watch out for the top posting, thanks :) On Thu, Dec 10, 2009 at 4:15 PM, Richard Tew <[email protected]>wrote: > Like most things you do with Stackless, you would do this by blocking > the tasklet on a channel. > > The Stackless Examples project has source code for a variety of > purposes. For instance, if you take a look at the following page, the > normal and alternative scheduling examples, you can probably see sleep > implementations within them. > > http://code.google.com/p/stacklessexamples/wiki/StacklessExamples > > Cheers, > Richard. > Great, thank you for the link, some examples are just what I need. Thanks, Jeremy.
_______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
