Skip to content
Permalink
Browse files
Replace Base.n_waiters with isempty (#254)
  • Loading branch information
barucden committed Oct 23, 2021
1 parent 3deb5b9 commit 56f8f9342389c1b9664157ca4a2d1f5501d8341d
Showing 1 changed file with 2 additions and 2 deletions.
@@ -170,7 +170,7 @@ end
function Base.close(ch::OrderedChannel)
@lock ch.cond begin
# just need to ensure any tasks waiting to put their tasks have had a chance to put
while Base.n_waiters(ch.cond) > 0
while !isempty(ch.cond)
wait(ch.cond)
end
close(ch.chan)
@@ -204,4 +204,4 @@ function toidict(pairs)
dict = Base.ImmutableDict(dict, pair)
end
return dict
end
end

0 comments on commit 56f8f93

Please sign in to comment.