diff options
author | Marc-Andre Lafortune <[email protected]> | 2020-10-24 00:01:17 -0400 |
---|---|---|
committer | Marc-André Lafortune <[email protected]> | 2020-10-30 15:22:18 -0400 |
commit | bd6cd851552df411053c1e3154ee781e7d1adadf (patch) | |
tree | 56580debf2cc7fb14a98c771be5fba8ebe9ac0e0 | |
parent | 7c548278f0fe218b247bde378b79a70e698e2491 (diff) |
Tweak return of `Ractor#close`, add doc
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3696
-rw-r--r-- | ractor.rb | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -150,21 +150,26 @@ class Ractor 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 |