Thread#status is "run" when thread is blocking on condition variable
--------------------------------------------------------------------
Key: JRUBY-3054
URL: http://jira.codehaus.org/browse/JRUBY-3054
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Environment: % uname -a
Darwin tiamat.local 9.5.0 Darwin Kernel Version 9.5.0: Wed Sep 3 11:29:43 PDT
2008; root:xnu-1228.7.58~1/RELEASE_I386 i386
% java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)
Reporter: James M. Lawrence
% cat waitcond.rb
require 'thread'
mutex = Mutex.new
cond = ConditionVariable.new
thread = Thread.new {
mutex.synchronize {
cond.wait(mutex)
}
}
3.times {
sleep(1)
puts "thread.status: #{thread.status.inspect}"
}
% jruby --version
jruby 1.1.4 (ruby 1.8.6 patchlevel 114) (2008-10-12 rev 7874) [i386-java]
% jruby waitcond.rb
thread.status: "run"
thread.status: "run"
thread.status: "run"
% ruby --version
ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-darwin9.4.0]
% ruby waitcond.rb
thread.status: "sleep"
thread.status: "sleep"
thread.status: "sleep"
% useruby 1.9
Activated ruby-1.9.0-r19756
% ruby --version
ruby 1.9.0 (2008-10-11 revision 19756) [i386-darwin9.5.0]
% ruby waitcond.rb
thread.status: "sleep"
thread.status: "sleep"
thread.status: "sleep"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email