Project

General

Profile

Actions

Feature #22247

open

Add Ractor.movable?

Feature #22247: Add Ractor.movable?

Added by rkh (Konstantin Haase) 1 day ago. Updated 1 day ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:126397]

Description

Some objects cannot be moved (like unshareable lambdas).

It would be great to have a method to check whether an object is movable, similar to Ractor.shareable?.

Not 100% sure what it should return for shareable objects, but I would lean towards true as well (despite them not being moved), as they can be passed to Ractor.send(object, move: true).

Actions

Also available in: PDF Atom