summaryrefslogtreecommitdiff
path: root/test/ruby/test_lambda.rb
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 /test/ruby/test_lambda.rb
parentddd3c92bf6555de8fc89fe81ed3d00d2f4a88275 (diff)
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]") ```
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7420
Diffstat (limited to 'test/ruby/test_lambda.rb')
0 files changed, 0 insertions, 0 deletions