Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError when using soft_timeout or timeout on Pool #385

Open
murrple-1 opened this issue Feb 17, 2023 · 0 comments
Open

TypeError when using soft_timeout or timeout on Pool #385

murrple-1 opened this issue Feb 17, 2023 · 0 comments

Comments

@murrple-1
Copy link

When calling code like

with Pool(job_data.n_cpu, timeout=5) as pool:
    results = pool.starmap(long_running_calculation, [...])

or

with Pool(job_data.n_cpu, soft_timeout=5) as pool:
    results = pool.starmap(long_running_calculation, [...])

we are seeing errors like this:

Thread 'TimeoutHandler' crashed: TypeError('can only concatenate list (not "int") to list')
Traceback (most recent call last):
  File "/venv/lib/python3.11/site-packages/billiard/pool.py", line 503, in run
    return self.body()
           ^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/billiard/pool.py", line 762, in body
    for _ in self.handle_timeouts():
  File "/venv/lib/python3.11/site-packages/billiard/pool.py", line 752, in handle_timeouts
    if _timed_out(ack_time, [soft|hard]_timeout):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/billiard/pool.py", line 730, in _timed_out
    if monotonic() >= start + timeout:
                      ~~~~~~^~~~~~~~~
TypeError: can only concatenate list (not "int") to list`

Please advise?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant