passing will and closing notification can conflict and Ractor::Selector#empty? can return wrong answer. This patch fix it.
s = Ractor::Selector.new s.add Ractor.new{10} s.add Ractor.new{20} r, v = s.wait vs = [] vs << v r, v = s.wait vs << v [*vs.sort, s.empty?] #=> "[10, 20, false]" (expected "[10, 20, true]")
fix timing bug
passing will and closing notification can conflict and
Ractor::Selector#empty?can return wrong answer.This patch fix it.