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 details)
Built Distribution
File details
Details for the file concurrex-0.0.1.tar.gz
.
File metadata
- Download URL: concurrex-0.0.1.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51d5f7cf0eeed057d2618c8380ba1d63c1c4bdfe42355dab7a2db673fb69cee8 |
|
MD5 | f2587bfd33205876b2089051993b51e6 |
|
BLAKE2b-256 | 88c432f00ed8b2f3dd3d1845d315ac462fca8366bfb26e19ef00668501319be4 |
File details
Details for the file concurrex-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: concurrex-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fce95127af80a0ed3a3b2a3e09cbeab39d10875880ec6743af53f1a334e4aec |
|
MD5 | fcf7ca7d60723e4ed8d379b88a8fe0f7 |
|
BLAKE2b-256 | f73573f2c1d7d6eb3780339794df0695e80c1ba7869e0a4c2a8f9b90f4c7108e |