An open API service indexing awesome lists of open source software.

https://github.com/isarandi/throttledpool

Parallel process pool that throttles the task producer thread to avoid out-of-memory issues
https://github.com/isarandi/throttledpool

blocking-queue bounded-buffer multiprocessing process-pool semaphore

Last synced: 3 months ago
JSON representation

Parallel process pool that throttles the task producer thread to avoid out-of-memory issues

Awesome Lists containing this project

README

        

# ThrottledPool
Parallel process pool that throttles the task producer thread to avoid out-of-memory issues.

## Example usage

```python

results = []
with throttledpool.ThrottledPool() as pool:
for item in items:
pool.apply_async(process_fn, (item, other_arg), kwargs=dict(a=1), callback=results.append)