You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import billiard as mp
# uncomment this line to use multiprocessing.
# No hangs occur, unlike with billiard
#import multiprocessing as mp
import func_that_fails
if __name__ == "__main__":
for f in [
test_cases.no_hang,
test_cases.no_hang_1,
test_cases.no_hang_2,
test_cases.no_hang_3,
test_cases.no_hang_4,
test_cases.hang,
test_cases.hang_2]:
print(f"testing {f.__name__}")
try:
spawned_thread = mp.get_context("spawn")
with spawned_thread.Pool(2) as pool:
pool.map(f, [[1], [2], [3], [4]])
except:
print("correctly caught exception from inside pool.map")
print("")
When using the standard multiprocessing library, no hangs occur. In order to reproduce this hang make sure the length of the iterable passed to map is greater than the number of worker processes spawned with Pool
The text was updated successfully, but these errors were encountered:
Hello,
Recently we have noticed some hangs occurring, with no error messages.
Environment:
billiard version: 4.2.0
Python 3.10.12.
Cases which don't cause hanging, and cause hanging:
In test_cases.py
In call_test_cases.py
When using the standard multiprocessing library, no hangs occur. In order to reproduce this hang make sure the length of the iterable passed to
map
is greater than the number of worker processes spawned withPool
The text was updated successfully, but these errors were encountered: