Skip to content

Commit 4b35a76

Browse files
mrknvtjnash
andauthored
Add usage note of waitall in docstring
Co-authored-by: Jameson Nash <[email protected]>
1 parent 3186c03 commit 4b35a76

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

base/task.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,12 @@ completed tasks completes with an exception.
377377
378378
The return value consists of two task vectors. The first one consists of
379379
completed tasks, and the other consists of uncompleted tasks.
380+
381+
!!! warning
382+
This may scale poorly compared to writing code that uses multiple individual tasks that
383+
each runs serially, since this needs to scan the list of `tasks` each time and
384+
synchronize with each one every time this is called. Or consider using
385+
[`waitall(tasks; failfast=true)`](@ref waitall) instead.
380386
"""
381387
waitany(tasks; throw=true) = _wait_multiple(tasks, throw)
382388

0 commit comments

Comments
 (0)