threadpool.py 0.9 - Thread control utilities
Wed, 18 Oct 2000 15:57:21 GMT
I'm pleased to announce the release of threadpool.py version 0.9,
released under the GNU LGPL.
threadpool.py can be obtained from:
Release Name: 0.9
This module uses the threading and Queue modules to create a pool of
After creating an instance of ThreadPool, one queues functions to be
excecuted. The pool dispatches the functions to the waiting threads,
When queueing a function on the pool with *pool*.put(), an instance
of ReturnValue is returned. ReturnValue is a subclass of
can be used in any context that a regular lazy expression can. When
a ReturnValue, the evaluating thread will block until the other thread
completed its work and loaded the return value of the function into the
VLocks are an alternative to RLocks which include a visible queue
for the lock.
lock, unlock, getLockFor, and deleteLockFor work with a module-level
dictionary of objects to locks, and can be more convenient than working
lock objects directly.
Locked and Async are callable wrappers around a function. Async calls
immediately after queueing their function on a thread pool, while Locked
first acquire the lock they were passed on creation, call their
release the lock.
Fixed endless loop bug when an exception was raised.
Move to SourceForge, release 0.8