Microthreads: wait( duration ) with minimal processor overhead, u thread6.py
Mike Fletcher
mfletch at tpresence.com
Fri May 26 17:15:07 EDT 2000
More information about the Python-list mailing list
Fri May 26 17:15:07 EDT 2000
- Previous message (by thread): IDEs, ID or EGO? (was: Decimals -> Fraction strings, my solution
- Next message (by thread): ANNOUNCE: Python CVS tree moved to SourceForge
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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. Module passes the included tests, but hasn't had any significant other testing. Should allow for having many thousands of paused items with very low overhead. Not as good as a system that can accept generic system events, but it should keep micro-threads from always pegging the processor in low-load conditions (such as watching ports). Note: there's a lot of overhead currently in adding a wait-ed thread. Micro-pauses may wind up chewing more power than just letting the system run. Optimisations welcome. Enjoy, Mike -----Original Message----- From: Just van Rossum [mailto:just at letterror.com] Sent: Wednesday, May 24, 2000 3:29 AM To: Mike Fletcher; 'tismer Kaun' Cc: Python Listserv (E-mail) Subject: RE: Micro-Threads: uthreadsleep.py -- scheduling of uthreads to c ontinue processing after given seconds ... Oh, for those of you interested in the latest uthread module, I've put a copy here: http://www.petr.nl/just/uthread4.py ... -------------- next part -------------- A non-text attachment was scrubbed... Name: uthread6.py Type: application/octet-stream Size: 33329 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-list/attachments/20000526/9e481221/attachment.obj>
- Previous message (by thread): IDEs, ID or EGO? (was: Decimals -> Fraction strings, my solution
- Next message (by thread): ANNOUNCE: Python CVS tree moved to SourceForge
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list