I cannot use multi-thread?

enviornments:

  • jruby 1.6.2 ( mode 1.8 )
  • rails 3.0.6
  • ubuntu 11.04 x86_64 x86_64 x86_64 GNU/Linux

Today, I try to use the multithread(in application.rb):

config.threadsafe!

But many class doesnt work

BTW: I’m using WEBrick. Maybe I should change a another application
server?


李福(李建业)

淘宝-技术研发部-广告技术
TEL:0571-88155188-79604
Email:[email protected]


This email (including any attachments) is confidential and may be
legally privileged. If you received this email in error, please delete
it immediately and do not copy it or use it for any purpose or disclose
its contents to any other person. Thank you.

本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件人,请您立即删除本邮件。请不要将本电邮进行复制并用作任何其他用途、或透露本邮件之内容。谢谢。

I’ve change to mongrel, but it still fail…

在 Mon, 05 Sep 2011 20:15:16 +0800,李福 [email protected] 写道:

enviornments:

  • jruby 1.6.2 ( mode 1.8 )
  • rails 3.0.6
  • ubuntu 11.04 x86_64 x86_64 x86_64 GNU/Linux

Today, I try to use the multithread(in application.rb):

config.threadsafe!

But many class doesnt work

BTW: I’m using WEBrick. Maybe I should change a another application
server?


李福(李建业)

淘宝-技术研发部-广告技术
TEL:0571-88155188-79604
Email:[email protected]


李福(李建业)

淘宝-技术研发部-广告技术
TEL:0571-88155188-79604
Email:[email protected]


This email (including any attachments) is confidential and may be
legally privileged. If you received this email in error, please delete
it immediately and do not copy it or use it for any purpose or disclose
its contents to any other person. Thank you.

本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件人,请您立即删除本邮件。请不要将本电邮进行复制并用作任何其他用途、或透露本邮件之内容。谢谢。

Which classes are you referring to that aren’t multi-threaded? Some of
the
core Ruby classes are not thread safe but there are ways to make them
thread
safe. For example, to make arrays thread safe, define this somewhere:

require ‘jruby/synchronized’
class Array
include JRuby::Synchronized
end

JRuby 1.6.2, 1.8Rails 3.0.9 multi-threadedû. Ӧwarbler to create war
fileȻdeploytomcat

2011/9/5 Eric F. [email protected]

Thanks.
Now I’m using trinidad for development environment.

But it’s still strange. In my case, when threadsafe is true, the single
thread server will be failed until I change the multiple-thread server.

the error code is on device:

current_user.apps.first......

trinidad is great

在 Thu, 08 Sep 2011 07:53:18 +0800,Rohit N.
[email protected] 写道: