Skip to content

Commit

Permalink
Updated readme with note on concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Mar 27, 2019
1 parent d2eb335 commit 8d4b91d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ pip install git+https://github.com/Erotemic/progiter.git
The `tqdm` library may be more appropriate in some cases.
*The advantage of `ProgIter` is that it does not use any python threading*,
and therefore can be safer with code that makes heavy use of multiprocessing.
[The reason](https://pybay.com/site_media/slides/raymond2017-keynote/combo.html)
for this is that threading before forking may cause locks to be duplicated
across processes, which may lead to deadlocks.


```python
>>> from progiter import ProgIter
>>> def is_prime(n):
Expand Down

0 comments on commit 8d4b91d

Please sign in to comment.