Python concurrent execution helpers
Project description
concurrex (concurrent execution)
The helpers in the Python standard library for concurrent execution, like threading
, multiprocessing
, concurrent.futures
are quite lacking.
Examples
from pillow import Image
def decode_image(path):
img = Image.open(path)
img.load()
return path, img
with ThreadPool(num_workers=3) as tp:
for result in tp.map(decode_image, Path(".").rglob("*.jpg"), bufsize=10)
path, img = result.get()
img.show()
label = input("label:")
print(path, label)
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
concurrex-0.0.1.tar.gz
(8.6 kB
view hashes)
Built Distribution
Close
Hashes for concurrex-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fce95127af80a0ed3a3b2a3e09cbeab39d10875880ec6743af53f1a334e4aec |
|
MD5 | fcf7ca7d60723e4ed8d379b88a8fe0f7 |
|
BLAKE2b-256 | f73573f2c1d7d6eb3780339794df0695e80c1ba7869e0a4c2a8f9b90f4c7108e |