Finding current Thread Id with JRuby on Rails -


i using rails3 puma on jruby 1.7 threaded mode ( config.threadsafe!) enabled.

now theory goes: multiple client requests come in, new thread used serve user rather new rails process being started every time.

if want find id of new request thread, how can so?

for purpose, find following methods useful:

thread.current gets of thread being executed

#<thread:0x8301ef4 run> 

thread.list array of thread objects threads either runnable or stopped.

[     [0] #<thread:0x8301ef4 run> ] 

hope helps


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -