Skip to content

Commit e78b4a5

Browse files
committed
Make Thread#status work
1 parent 662ba4a commit e78b4a5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/concurrent/synchronized_object.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,8 @@ def synchronize
112112

113113
private
114114

115-
def ns_wait(timeout)
116-
if timeout
117-
JRuby.reference0(self).wait(timeout * 1000)
118-
else
119-
JRuby.reference0(self).wait
120-
end
115+
def ns_wait(timeout = nil)
116+
JRuby.reference0(Thread.current).wait_timeout(self, timeout)
121117
self
122118
end
123119

0 commit comments

Comments
 (0)