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 lacking for certain use cases like backpressure and flow control.
Requirements
The library works on Python 3.8+, but an important Python bug (bpo-29988) was fixed in Python 3.10, which makes ctrl-c handling much more reliable.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file concurrex-0.0.2.tar.gz.
File metadata
- Download URL: concurrex-0.0.2.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95b0c703ddcfc3551bb35704b169f4ccac46202b88437a69186d9076f4b825e3
|
|
| MD5 |
9051a40a644100f758437a0bdf8e4613
|
|
| BLAKE2b-256 |
9527e4e8d90644bbbc1d1ee968e36a4521a7307de14745b5b1b09ba79b03ee25
|
Provenance
The following attestation bundles were made for concurrex-0.0.2.tar.gz:
Publisher:
ci.yml on Dobatymo/concurrex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
concurrex-0.0.2.tar.gz -
Subject digest:
95b0c703ddcfc3551bb35704b169f4ccac46202b88437a69186d9076f4b825e3 - Sigstore transparency entry: 311140010
- Sigstore integration time:
-
Permalink:
Dobatymo/concurrex@c121ee5bd83eccb4d7248e9a04e0dc0254aa8903 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Dobatymo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c121ee5bd83eccb4d7248e9a04e0dc0254aa8903 -
Trigger Event:
push
-
Statement type:
File details
Details for the file concurrex-0.0.2-py3-none-any.whl.
File metadata
- Download URL: concurrex-0.0.2-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99df45764320d6c9a30cc0e6f08d78df965d638226dd877abf7a0a46c9c37412
|
|
| MD5 |
34a2d92f115c3d60fae728edd6852f7a
|
|
| BLAKE2b-256 |
d8d0e380bb0472f3447f8e2bbedb70f186be8b553851704dd4f7544ab767ed4f
|
Provenance
The following attestation bundles were made for concurrex-0.0.2-py3-none-any.whl:
Publisher:
ci.yml on Dobatymo/concurrex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
concurrex-0.0.2-py3-none-any.whl -
Subject digest:
99df45764320d6c9a30cc0e6f08d78df965d638226dd877abf7a0a46c9c37412 - Sigstore transparency entry: 311140027
- Sigstore integration time:
-
Permalink:
Dobatymo/concurrex@c121ee5bd83eccb4d7248e9a04e0dc0254aa8903 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Dobatymo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c121ee5bd83eccb4d7248e9a04e0dc0254aa8903 -
Trigger Event:
push
-
Statement type: