Thread pool
This is a simple thread pool for python(using queue module).
Usage
Firstly, you should define a callback to deal with your task:
def do_work(*args, **kwds): # do somethingThen, you can create a thread pool to schedule your tasks:
from thread_pool import ThreadPool # Create thread pool with nums threads pool = ThreadPool(nums) # Add a task into pool pool.add_task(do_work, args, kwds) # Join and destroy all threads pool.destroy()
Release files for thread_pool 0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| thread_pool-0.9.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| thread_pool-0.9-py2.7.egg | Legacy Egg format | - | - | Details |
Total release size: 8.3 kB
Release files / thread_pool-0.9.tar.gz
| Download URL | thread_pool-0.9.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e055db47643eaecf5432837cec2058173f985c600fa0ee58eb7bae58fd34a7dc
|
|
BLAKE2b-256 checksum How to use checksums |
740ca25ae9c5b9316f62ae1323ce82f6bac3d071cad713bf7c672a5805404324
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / thread_pool-0.9-py2.7.egg
| Download URL | thread_pool-0.9-py2.7.egg |
|---|---|
| Size | 5.2 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
a5ab81e9577339764f47328af478e5de13e3aa141e79a9b97f7b47afaedabe2a
|
|
BLAKE2b-256 checksum How to use checksums |
bb8bd8ba7f9157c48c8375546d99dd0832de601f56f8d32691dab42b308e3739
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |