Easy to use object-oriented thread pool framework
Project description
A thread pool is an object that maintains a pool of worker threads to perform
time consuming operations in parallel. It assigns jobs to the threads
by putting them in a work request queue, where they are picked up by the
next available thread. This then performs the requested operation in the
background and puts the results in another queue.
The thread pool object can then collect the results from all threads from
this queue as soon as they become available or after all threads have
finished their work. It's also possible, to define callbacks to handle
each result as it comes in.
.. note::
This module is regarded as an extended example, not as a finished product.
Feel free to adapt it too your needs.
time consuming operations in parallel. It assigns jobs to the threads
by putting them in a work request queue, where they are picked up by the
next available thread. This then performs the requested operation in the
background and puts the results in another queue.
The thread pool object can then collect the results from all threads from
this queue as soon as they become available or after all threads have
finished their work. It's also possible, to define callbacks to handle
each result as it comes in.
.. note::
This module is regarded as an extended example, not as a finished product.
Feel free to adapt it too your needs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
threadpool-1.2.4.tar.bz2
(36.1 kB
view details)
File details
Details for the file threadpool-1.2.4.tar.bz2
.
File metadata
- Download URL: threadpool-1.2.4.tar.bz2
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b0cab26e824f3ac3a145895a45b5b1bc1f31a4f0b4bfb390bc4f20bf77bf86c |
|
MD5 | b7256d290b560503bd9e49de33241d69 |
|
BLAKE2b-256 | 652359df827cd27ac9572ebaea8c92a8c729232c03dfb8a506ddf9aa278bcd59 |