[Stackless] Tasklet delays

Jeremy Stott tins.jeremy at gmail.com
Thu Dec 10 01:40:22 CET 2009


Hello,

So far I am loving stackless python! I am totally new to it though and was
wondering about having tasklets wait for a certain amount of time.

The problem is:
I would like to have a tasklet wait for 2 seconds before returning to the
scheduling queue, but not delay any other running tasklets.

What I have done:
timeStart = time.time()

while (time.time() < timeStart + 2):
    stackless.schedule()

But this way does waste resources every scheduling cycle. Is there a better
way to do this?

Thanks,

Jeremy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20091210/57a7f211/attachment.htm>


More information about the Stackless mailing list