From: "ko1 (Koichi Sasada)" Date: 2021-10-27T07:15:18+00:00 Subject: [ruby-core:105819] [Ruby master Feature#18137] A new method to check Proc is isolated or not Issue #18137 has been updated by ko1 (Koichi Sasada). `Ractor.shareable?(proc_object)` is not enough? ---------------------------------------- Feature #18137: A new method to check Proc is isolated or not https://bugs.ruby-lang.org/issues/18137#change-94343 * Author: tagomoris (Satoshi TAGOMORI) * Status: Open * Priority: Normal ---------------------------------------- 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. -- https://bugs.ruby-lang.org/ Unsubscribe: