Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
MonitorMixin#mon_initialize
() -> untyped
mon_initialize
ext/monitor/lib/monitor.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/ext/monitor/lib/monitor.rb, line 229
def mon_initialize
if defined?(@mon_data)
if defined?(@mon_initialized_by_new_cond)
return # already initialized.
elsif @mon_data_owner_object_id == self.object_id
raise ThreadError, "already initialized"
end
end
@mon_data = ::Monitor.new
@mon_data_owner_object_id = self.object_id
end
Initializes the MonitorMixin after being included in a class or when an object has been extended with the MonitorMixin