[Stackless] tasklet sleep()

Andrew Francis andrewfr_ice at yahoo.com
Wed Aug 3 18:44:47 CEST 2011


Hi Folks:

Message: 2
Date: Tue, 2 Aug 2011 10:54:41 -0400
From: Andrew Tutt <tutt.andrew at gmail.com>
To: The Stackless Python Mailing List <stackless at stackless.com>
Subject: Re: [Stackless] tasklet sleep()
Message-ID:
    <CAPBpzo2j7Pn4UqxB6i8jJ0-5OfkzbLfP7npKT6oR03xuz_SuLw at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

>As I've noted elsewhere, all sleep() functions in stackless are inherently
>busy sleep because they are being continuously rerouted to the scheduler.

The technique I use avoids most of the busy polling problem. The closest thing
to busy polling, Task.looping call is sometimes needed because the reactor does not
know that it is running in a tasklet and needs to occasionally yield to the scheduler.

Cheers,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20110803/4a21a5ee/attachment.html>


More information about the Stackless mailing list