Forum: JRuby Thread names

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Guillermo A. (Guest)
on 2009-01-06 20:08
(Received via mailing list)
Hello guys,

can I give names to the JRuby threads? I am trying to debug the GC of
a jruby application and in jconsole I can see only thread-1, thread-2,
etc. I would like to assign names so I know which piece of ruby code
is running each thread.

Thanks in advance,

GA


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Peter K Chan (Guest)
on 2009-01-06 20:23
(Received via mailing list)
I am not aware of any way to set thread name in Ruby, but you can just
access
the Java threading system directly:

java.lang.Thread.currentThread.setName('JRubyWorker')

Peter
This topic is locked and can not be replied to.