summaryrefslogtreecommitdiff
path: root/ractor.rb
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-12-16 17:18:07 +0900
committerKoichi Sasada <ko1@atdot.net>2020-12-16 17:18:13 +0900
commit0a521618723e5e602c1288b4185b869e94332172 (patch)
tree8fd74c55e4caa73aea8438270b04fa50dfa6c46e /ractor.rb
parentc668772b145b7fd889000480778e011a808442ab (diff)
fix Ractor#receive by other ractors
Ractor#receive can be called by the another Ractors using send, so making this method completely same as `Ractor.receive` even if the ractor is specified by the receiver (OO term :p).
Diffstat (limited to 'ractor.rb')
-rw-r--r--ractor.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ractor.rb b/ractor.rb
index ca09aee7be..c3a8f27532 100644
--- a/ractor.rb
+++ b/ractor.rb
@@ -94,10 +94,10 @@ class Ractor
alias recv receive
end
+ # same as Ractor.receive
private def receive
__builtin_cexpr! %q{
- // TODO: check current actor
- ractor_receive(ec, RACTOR_PTR(self))
+ ractor_receive(ec, rb_ec_ractor_ptr(ec))
}
end
alias recv receive