[前][次][番号順一覧][スレッド一覧]

ruby-changes:63484

From: Marc-Andre <ko1@a...>
Date: Sat, 31 Oct 2020 04:22:42 +0900 (JST)
Subject: [ruby-changes:63484] bd6cd85155 (master): Tweak return of `Ractor#close`, add doc

https://git.ruby-lang.org/ruby.git/commit/?id=bd6cd85155

From bd6cd851552df411053c1e3154ee781e7d1adadf Mon Sep 17 00:00:00 2001
From: Marc-Andre Lafortune <github@m...>
Date: Sat, 24 Oct 2020 00:01:17 -0400
Subject: Tweak return of `Ractor#close`, add doc


diff --git a/ractor.rb b/ractor.rb
index 936310d..b9fb429 100644
--- a/ractor.rb
+++ b/ractor.rb
@@ -150,21 +150,26 @@ class Ractor https://github.com/ruby/ruby/blob/trunk/ractor.rb#L150
     attr_reader :ractor
   end
 
+  # Closes the incoming port and returns its previous state.
   def close_incoming
     __builtin_cexpr! %q{
       ractor_close_incoming(ec, RACTOR_PTR(self));
     }
   end
 
+  # Closes the outgoing port and returns its previous state.
   def close_outgoing
     __builtin_cexpr! %q{
       ractor_close_outgoing(ec, RACTOR_PTR(self));
     }
   end
 
+  # Closes both incoming and outgoing ports.
   def close
     close_incoming
     close_outgoing
+
+    self
   end
 
   # utility method
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]