Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class method · added in Ruby 3.4
Ractor.main?
() -> ::boolish
main?
ractor.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/ractor.rb, line 886
def self.main?
__builtin_cexpr! %q{
RBOOL(GET_VM()->ractor.main_ractor == rb_ec_ractor_ptr(ec))
}
end
return true if the current ractor is main ractor
Ruby version changes
-
3.4
-
Ractor.main?is added. [Feature #20627]
-