[Stackless] A Timer Method

Richard Tew richard.m.tew at gmail.com
Wed Feb 8 22:58:53 CET 2012

On Thu, Feb 9, 2012 at 10:42 AM, Andrew Francis <andrewfr_ice at yahoo.com> wrote:
> ...
> like scheduling tasks. These are fine but it seems we are all re-inventing
> the wheel.
> Given the ubiquity of timing, why isn't timing is a built in feature? For

Because it is too high level.  To me the existing set of features are
a nice clean set which sit together at a low level.

> instance the Go language has a tick channel. Also if I recall, CCP games
> built some sort of asynchronous callback queue in Python that is connected
> to the clock (I am trying to find the reference). Couldn't that be used as
> the basis of a timer function?

You should install "stacklesslib".  It provides the next highest level
up set of functionality which people can base an application on,
including support for sleeping.  It was used at CCP when last I was
there for DUST, and I use it also for my personal projects now.  In
fact, what I tend to do lately is to have stacklesslib monkey patch in
place all of its functionality, and just write normal Python code and
have stackless magic added in the background.

pip install stacklesslib

Should do the trick.  It comes with stacklesssocket bundled.


More information about the Stackless mailing list