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

Add waitany and waitall functions to wait multiple tasks at once #53341

Merged
merged 30 commits into from
Mar 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1fb6a95
Add waitany and waitall to wait multiple tasks
mrkn Jan 22, 2024
7482838
Reduce the number of working vectors
mrkn Feb 4, 2024
5a30999
Rewrite with using Channel
mrkn Feb 8, 2024
664f8a3
Add test cases to Cover all argument types
mrkn Feb 15, 2024
8ac6ddc
Remove return type of _wait_multiple
mrkn Feb 27, 2024
f459e8a
Remove 1st argument type of _wait_multiple
mrkn Feb 27, 2024
eb2bafd
Specify type of element that comes from iteration for type stability
mrkn Feb 27, 2024
d7cf9dc
Support inputs that can be iterated only once
mrkn Mar 1, 2024
9159247
Delete waiters from waitq of each remaining task
mrkn Mar 1, 2024
573ee9f
Fix for performance
mrkn Mar 1, 2024
1175779
Split type checking and examining loops
mrkn Mar 4, 2024
633cb58
Stop using needless enumerate
mrkn Mar 5, 2024
4bec8cd
Optimize for waitall with failfast=false
mrkn Mar 5, 2024
b9dd9e6
Use vector for managing waiters
mrkn Mar 5, 2024
ae0ca9d
Add channel emptiness check
mrkn Mar 5, 2024
93057e6
Insert done check in waiter creation loop
mrkn Mar 5, 2024
ed58eda
Stop using kwargs in _wait_multiple
mrkn Mar 6, 2024
f1f400e
Add throw keyword argument in waitall
mrkn Mar 6, 2024
4d8e137
Add throw keyword argument in waitany
mrkn Mar 6, 2024
1a55697
Add docstrings of waitany and waitall
mrkn Mar 7, 2024
22646dd
Wait single task synchronously
mrkn Mar 7, 2024
505d476
Use TaskFailedException
mrkn Mar 7, 2024
1c9adbf
Stop using sleep in test
mrkn Mar 7, 2024
58d1e02
Remove needless yield call
mrkn Mar 7, 2024
3c9a9c8
Wait all three tasks in teardown function in test
mrkn Mar 7, 2024
4dd8862
Use consistent declarative tense in docstring
mrkn Mar 7, 2024
34e3d41
Add waitany and waitall in doc/src/base/parallel.md
mrkn Mar 7, 2024
8a7683f
Add waitany and waitall in NEWS.md
mrkn Mar 7, 2024
d30c9c0
Change default argument values
mrkn Mar 8, 2024
0a382a3
Add usage note of waitall in docstring
mrkn Mar 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add waitany and waitall in NEWS.md
  • Loading branch information
mrkn committed Mar 9, 2024
commit 8a7683f33d30c1a16e1ed3fb7a6bc0aae03ac9c1
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ New library functions

* `logrange(start, stop; length)` makes a range of constant ratio, instead of constant step ([#39071])
* The new `isfull(c::Channel)` function can be used to check if `put!(c, some_value)` will block. ([#53159])
* `waitany(tasks; throw=false)` and `waitall(tasks; failfast=false, throw=false)` which wait multiple tasks at once ([#53341]).

New library features
--------------------
Expand Down