Skip to content
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,15 @@ def run_until_all_yielded
cond_fiber = nil
cond_result = nil
@wait_conditions.each do |seq, cond|
# Evaluate condition or skip if not true
next unless (cond_result = cond.first.call)

cond_fiber = cond[1]
@wait_conditions.delete(seq)
# There have been reports of this fiber being completed already, so we make sure not to process if it
# has, but we still delete it
deleted_cond = @wait_conditions.delete(seq)
next unless deleted_cond&.last&.alive?

cond_fiber = deleted_cond.last
break
end
return unless cond_fiber
Expand Down
Loading