Project

General

Profile

Actions

Feature #18137

open

A new method to check Proc is isolated or not

Added by tagomoris (Satoshi TAGOMORI) about 2 months ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:105079]

Description

I want to check a Proc is isolated or not, like Proc#isolated?.

Proc objects are passed to libraries very often. For example, Rack web application is a callable (respond_to(:call)) object, and it may be a Proc.
When the library will call that Proc object in a Ractor, the passed Proc should be isolated by Ractor.make_shareable(). Otherwise, it causes RuntimeError.

So I want to check the Proc object is isolated or not earlier. It should be very helpful for library users because of the early and clear error messages.

No data to display

Actions

Also available in: Atom PDF