multithreadinginpython
multithreadinginpython copied to clipboard
Multi-threading examples in Python
HTTPError due to missing header
fixing ssl issue urllib.error.URLError:
Allowing `WaitGroup.add(count)` to accept a value to be added to `WaitGroup.wait_count` seems to be inconsistent with `WaitGroup.done()` which only ever decrements the count by 1. A thread could be started...
https://github.com/cutajarj/multithreadinginpython/blob/b2df1e8420c1051f6899a4a1fbdbecf62b6c0136/barriers/matrix_multiply.py#L20 This loop causes the barrier.wait() to be called too many times, which i think resets the count when it reaches 0 and therefore the code never exits