Java native threads are not added to ThreadService.rubyThreadMap after being 
adopted.
-------------------------------------------------------------------------------------

                 Key: JRUBY-3742
                 URL: http://jira.codehaus.org/browse/JRUBY-3742
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.3, JRuby 1.2
            Reporter: Peter Williams


Given a java native thread in a mixed java + ruby program, if the java native 
thread calls ruby code, the thread is automatically "adopted" by the ruby 
runtime (RubyThread.adoptThread()).

While the current implementation does create a RubyThread instance (aka 
context) and save it, this thread instance does not get added to 
ThreadService.rubyThreadMap.

Fast forward to some subsequent ruby code that calls RubyThread.list() to 
retrieve all current (ruby?) threads -- the ruby thread instances associated 
with any adopted java threads are not included in this list.

This impacts using RDebug to debug Ruby web apps running on GlassFish V3 since 
all request handing and subsequent ruby code execution occurs on threads from 
the Grizzly thread pool, which of course all originate as java native threads.  
RDebug uses RubyThread.list() at various times to get the list of non-debug 
ruby threads and correlate them against threads on which breakpoints have 
fired, etc.  See https://glassfish.dev.java.net/issues/show_bug.cgi?id=8486


-- 
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


Reply via email to