We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2253a86 commit 575bde2Copy full SHA for 575bde2
1 file changed
lib/monitor.rb
@@ -160,6 +160,14 @@ def new_cond
160
return ConditionVariable.new(@mon_data)
161
end
162
163
+ # Clear the monitor before freezing. A frozen object cannot be
164
+ # synchronized, so the Monitor serves no purpose and would prevent
165
+ # the object from being made Ractor-shareable.
166
+ def freeze
167
+ @mon_data = nil
168
+ super
169
+ end
170
+
171
private
172
173
# Use <tt>extend MonitorMixin</tt> or <tt>include MonitorMixin</tt> instead
0 commit comments