Threads don't appear to inherit the thread group of their creating thread
-------------------------------------------------------------------------
Key: JRUBY-3568
URL: http://jira.codehaus.org/browse/JRUBY-3568
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.2, JRuby 1.1.6
Environment: Mac OS Leopard, Linux
Reporter: Rob Holland
According to the Ruby documentation (and the implementation of MRI) threads
should inherit the thread group of the thread which creates them. This doesn't
happen under JRuby 1.1.6 or 1.2 (I've not checked earlier releases).
irb(main):001:0> tg = ThreadGroup.new
=> #<ThreadGroup:0x8374c9>
irb(main):002:0> Thread.new do
irb(main):003:1* tg.add(Thread.current)
irb(main):004:1> puts tg.list
irb(main):005:1> puts Thread.new { sleep }
irb(main):006:1> puts tg.list
irb(main):007:1> end
#<Thread:0xe796ff>
=> #<Thread:0xe796ff run>
#<Thread:0x2a9403>
#<Thread:0xe796ff>
irb(main):008:0> puts tg.list
=> nil
tg.list should contain the sleeping thread 0xe796ff
--
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