summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-11-11 16:15:04 +0900
committerKoichi Sasada <ko1@atdot.net>2020-11-11 18:11:09 +0900
commitfa3670e6e48a8553ad1f37bbfbd112911da497d1 (patch)
tree4f404fb65933deb061cb4e0cee158d2c3730bced /bootstraptest
parentdeed21bb08170431891b65fda26f4a3557c9ffd4 (diff)
remove Ractor#close
close_incoming by antoher ractor means there is no other messages will be sent to the ractor, so Ractor.receive will block forever, and it should raise and stop. close_outgoing by antoher ractor means, ... I don't have good idea to use it. It can be a private method. Ractor#close calls both, but it does not make sense to call different purpose methods, so I remove it.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3759
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_ractor.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb
index 0720c01caa..7101964a31 100644
--- a/bootstraptest/test_ractor.rb
+++ b/bootstraptest/test_ractor.rb
@@ -201,8 +201,8 @@ assert_equal 'ok', %q{
# Raise Ractor::ClosedError when try to send into a closed actor
assert_equal 'ok', %q{
r = Ractor.new { Ractor.receive }
+ r.close_incoming
- r.close
begin
r.send(1)
rescue Ractor::ClosedError
@@ -219,7 +219,7 @@ assert_equal 'ok', %q{
Ractor.receive
end
- r.close
+ r.close_outgoing
begin
r.take
rescue Ractor::ClosedError