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

Specialize remotecall_pool(remotecall) to wait for the remotecall #20

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

JamesWrigley
Copy link
Collaborator

Otherwise the worker would prematurely be put back into the pool, causing oversubscription. Also added a warning about oversubscription to the docstring for remote_do(f, ::AbstractWorkerPool).

Fixes JuliaLang/Distributed.jl#81. If this is merged I'll backport it to Distributed.

@JamesWrigley JamesWrigley added the bug Something isn't working label Jan 7, 2025
@JamesWrigley JamesWrigley requested a review from jpsamaroo January 7, 2025 23:53
@JamesWrigley JamesWrigley self-assigned this Jan 7, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.02%. Comparing base (0cca4d3) to head (0170b7d).

Files with missing lines Patch % Lines
src/workerpool.jl 75.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
- Coverage   88.24%   88.02%   -0.23%     
==========================================
  Files          11       11              
  Lines        2068     2080      +12     
==========================================
+ Hits         1825     1831       +6     
- Misses        243      249       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Otherwise the worker would prematurely be put back into the pool, causing
oversubscription. Also added a warning about oversubscription to the docstring
for `remote_do(f, ::AbstractWorkerPool)`.
@JamesWrigley
Copy link
Collaborator Author

Updated this to also wrap the internal call to remotecall() in a try-catch so that we don't leak workers if that fails. I think this is a fairly straightforward fix so if there's no objections I'll merge it at the end of the week.

@JamesWrigley JamesWrigley merged commit 97b7f4a into master Jan 17, 2025
14 checks passed
@JamesWrigley JamesWrigley deleted the remotecall-pool branch January 17, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation of Distributed.remotecall() misleading
3 participants