From: marcandre-ruby-core@... Date: 2020-12-18T06:40:19+00:00 Subject: [ruby-core:101508] [Ruby master Feature#17404] Ractor `move:` API to allow shareability check Issue #17404 has been updated by marcandre (Marc-Andre Lafortune). ko1 (Koichi Sasada) wrote in #note-1: > `#send_ref(message)` and raise an error if message is not a sharable? There would be an easy way to deep-copy or deep-move an object, right? If you mean that the default should be `pass: :share`, then that seems fine by me. ---------------------------------------- Feature #17404: Ractor `move:` API to allow shareability check https://bugs.ruby-lang.org/issues/17404#change-89290 * 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: