Microthreads: wait( duration ) with minimal processor overhead, u

Will Ware wware at world.std.com
Fri May 26 21:42:03 EDT 2000


Mike Fletcher (mfletch at tpresence.com) wrote:
> Attached find uthread6.py (modified version of Just's uthread4.py).  This
> adds a mechanism for putting micro-threads to sleep (with minimal processor
> overhead), both when other micro-threads are running and when only sleeping
> threads are present.
> ... it should keep micro-threads from always pegging the processor in
> low-load conditions (such as watching ports).

Normal sleeping threads (for instance, a thread that has blocked while
waiting for input from a queue, or waiting for a timer to finish) do not
take up any processor activity until the they are reactivated by the
event that wakes them. I think you may be working on an already-solved
problem.

> [uthread6.py]

Using the Unix 'mail' program, I find that the text is full of nonsense
like "3D" and "=09". I think this is an artifact of MIME encoding. Is
there any way to repost it without this stuff? Or is there a filter
somewhere handy for getting rid of it?

-- 
 - - - - - - - - - - - - - - - - - - - - - - - -
Resistance is futile. Capacitance is efficacious.
Will Ware	email:    wware @ world.std.com



More information about the Python-list mailing list