Multi-thread in rails application in tomcat
- From: Benyi Wang <bewang.tech@gmail.com>
- To: dev@warbler.kenai.com
- Subject: Multi-thread in rails application in tomcat
- Date: Tue, 10 May 2011 10:38:14 -0700
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Mm6zWr756FwB5IgCZ4o8TRvXBan1PjhCLEybg90L94lgeckWM3737CufF/2xDMs8Qe cuceAcuuLAuXtPGFWxmIuyuXyAVmtQtwTpXLzDjfxRVS5wCWvyw93qzxKpp/ImXyxGd0 0bw+mg17mzutm0gKH09OOgH10nZfzEy8NpWPo=
Hi,
I'm sorry if the question should not be posted here.
I'm running my rails application in production mode in tomcat. And threadsafe! is turned on.
If I use multiple threads to run different active record queries, what happens if an error is raised and not caught?
my code like this:
t1 = Thread.new {
do something
}
t2 = Thread.new {
do something
}
}
t1.join
t2.join
If an error is raised, the thread seems not be joined, will those threads exist until tomcat is rebooted?
Thanks.
Ben
|
Multi-thread in rails application in tomcat |
Benyi Wang | 05/10/2011 |





