Skip to content

Commit f5caf0a

Browse files
freemin7NHDaly
authored andcommitted
Update Condition() docs to highlight return value and error (#50688)
1 parent 54d7307 commit f5caf0a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

base/condition.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,9 @@ isempty(c::GenericCondition) = isempty(c.waitq)
175175
176176
Create an edge-triggered event source that tasks can wait for. Tasks that call [`wait`](@ref) on a
177177
`Condition` are suspended and queued. Tasks are woken up when [`notify`](@ref) is later called on
178-
the `Condition`. Edge triggering means that only tasks waiting at the time [`notify`](@ref) is
179-
called can be woken up. For level-triggered notifications, you must keep extra state to keep
178+
the `Condition`. Waiting on a condition can return a value or raise an error if the optional arguments
179+
of [`notify`](@ref) are used. Edge triggering means that only tasks waiting at the time [`notify`](@ref)
180+
is called can be woken up. For level-triggered notifications, you must keep extra state to keep
180181
track of whether a notification has happened. The [`Channel`](@ref) and [`Threads.Event`](@ref) types do
181182
this, and can be used for level-triggered events.
182183

0 commit comments

Comments
 (0)