summaryrefslogtreecommitdiff
path: root/encindex.h
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2023-03-03 03:24:59 +0900
committerKoichi Sasada <ko1@atdot.net>2023-03-03 10:19:37 +0900
commit941d36d195691949afe2ce464b0d0aa20208e637 (patch)
treea2bb7e7ffc2929ad762d0a7227491acf6bb2d654 /encindex.h
parentddd3c92bf6555de8fc89fe81ed3d00d2f4a88275 (diff)
downloadruby-941d36d195691949afe2ce464b0d0aa20208e637.tar.gz
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]") ```
Diffstat (limited to 'encindex.h')
0 files changed, 0 insertions, 0 deletions