Project

General

Profile

« Previous | Next » 

Revision 941d36d1

Added by ko1 (Koichi Sasada) over 2 years ago

fix timing bug

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]")