File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ def ns_signal
122
122
# ignore
123
123
end
124
124
125
- class RubySynchronizedObject < AbstractSynchronizedObject
125
+ class MutexSynchronizedObject < AbstractSynchronizedObject
126
126
def initialize
127
127
@__lock__do_not_use_directly = Mutex . new
128
128
@__condition__do_not_use_directly = ::ConditionVariable . new
@@ -151,7 +151,7 @@ def ns_wait(timeout)
151
151
end
152
152
end
153
153
154
- class Ruby19SynchronizedObject < RubySynchronizedObject
154
+ class MonitorSynchronizedObject < MutexSynchronizedObject
155
155
def initialize
156
156
@__lock__do_not_use_directly = Monitor . new
157
157
@__condition__do_not_use_directly = @__lock__do_not_use_directly . new_cond
@@ -173,10 +173,13 @@ def ns_wait(timeout)
173
173
when Concurrent . on_jruby?
174
174
JavaSynchronizedObject
175
175
when Concurrent . on_cruby? && ( RUBY_VERSION . split ( '.' ) . map ( &:to_i ) <=> [ 1 , 9 , 3 ] ) >= 0
176
- Ruby19SynchronizedObject
176
+ MonitorSynchronizedObject
177
177
when Concurrent . on_cruby?
178
- RubySynchronizedObject
178
+ MutexSynchronizedObject
179
+ when Concurrent . on_rbx?
180
+ # TODO better implementation
181
+ MonitorSynchronizedObject
179
182
else
180
- RubySynchronizedObject
183
+ MutexSynchronizedObject
181
184
end
182
185
end
You can’t perform that action at this time.
0 commit comments