From: marcandre-ruby-core@... Date: 2020-12-18T21:17:27+00:00 Subject: [ruby-core:101526] [Ruby master Feature#17404] Ractor `move:` API to allow shareability check Issue #17404 has been updated by marcandre (Marc-Andre Lafortune). Oh, sorry, I didn't see the `_ref` part. So you are proposing a different method. In my mind, they are all ways of sending a message, it's just a question of method to cross the Ractor frontier. move/copy/has-cross-border-visa ���� Otherwise we could have `Ractor#move`, `Ractor#copy` and `Ractor#send`, but seems to me like one method with one keyword (`pass`, `via` or `transfer`) is best API. Did Matz say anything about API? ---------------------------------------- Feature #17404: Ractor `move:` API to allow shareability check https://bugs.ruby-lang.org/issues/17404#change-89311 * Author: marcandre (Marc-Andre Lafortune) * Status: Open * Priority: Normal * Assignee: ko1 (Koichi Sasada) ---------------------------------------- I'd like to `ractor.send(message)` and express that `message` should be shareable. Currently I'm given two choices: `move: true` and `move: false` / nothing, neither of which have an effect if my `message` is shareable, and neither of which will tell me in case there's a bug in my program and `message` is not shareable. Could we consider a slightly different API (for 3.0 or 3.1)? ```ruby ractor.send(message, pass: :copy) # => like current `move: false` ractor.send(message, pass: :move) # => like current `move: true` ractor.send(message, pass: :share) # => raise in case message is not shareable ractor.send(message) # => same as `pass: :copy` ``` -- https://bugs.ruby-lang.org/ Unsubscribe: