Author Commit Message Labels Comments Date
update version for map_async change
If callback function given, then callback send response.
submit async needs to pass chunksize
Executor map() and map_async() methods take optional chunksize parameter to limit concurrenty. This lets caller avoid using too many threads when processing many items.
Update version for changes to map_ mathods.
Calling an Executor's map() and map_async() methods is no longer restricted to a single parameter per call. Renamed and fixed Reactor map_in_thread() and map_in_thread_async() methods. Added unit tests to cover ThreadPool.map_async() and Reactor map_ methods.
Executor class provides common interface and functionality for ThreadPool calsses. Optionally change size limits when manually resizing ThreadPool. Added separate unit test for ThreadRunner.
Added ThreadRunner class that is like ThreadPool, but runs each submitted task in a new thread. Reactor uses ThreadRunner if no ThreadPool given to ctor. ThreadRunner has same interface as ThreadPool and simplifies Reactor by allowing same syntax for thread pool or no thread pool. ThreadPool has map() method that is a parallel version of Python map(). Reactor map_call_in_thread() which calls into its threadpool's map() method.
Submitting task to ThreadPool returns a completion object, same as with submitting a task to the Reactor. Optional result queue can be specified when submitting task to ThreadPool. New Task class to hold task execution data. Same Task.execute() method used for both Reactor and ThreadPool task execution. Replaces thread_wrapper in Reactor. Removed redundant asserts. Do not allow replacing callback when defering reactor call.
ThreadPool: replace __len__() with threads() for getting number of threads in thread pool. More explicit meaning, so clearer and less change of unexpected behavior. Renamed get_idle_threads() to idle_threads(), get_queue_size() to qsize(). Reactor unit test checkes that thread pool is being used.
Reactor.shutdown() takes optional parameter to shutdown threadpool. Reactor.shutdown() returns True on success.
Fix decreasing pool size when too many idle threads.
Remove bad assert
Add printing back into unit test. Reformat output.
Added call_at() method to Reactor.
- ThreadPool can now, optionally, automatically resize itself. - Changed "Result" class to "Completion". - Renamed methods in Completion class. - Reactor constructor now takes optional ThreadPool object instead of ThreadPool construction parameters. Decouples ctors: changes to ThreadPool ctor do not require change to Reactor ctor. - Removed overloaded (internal) parameters when queuing scheduled calls. - ThreadPool queue_task() renamed to submit().
update version
Fix import issue.
update version
- Result is not available until callback completes. This allows caller waiting on result to reliably handle exception in callback. - Callback function takes return from called function as argument. - Fix python3 compatibility issue on import. - Add unit tests to test exception in callback.
In reactor call_ methods, optionally specify a queue to put Result objects one when the associated function has completed.
Fix spelling in README
Update README. Add so that examples are included in source dist.
Fix setup issue with python3. Add example.
Code is python3 compatible.
Fix wiki link
Update README.
initial commit