0

I've built my application using MRI without taking into consideration threads or concurrency, and so the application is most definitely not threadsafe (many of dependencies certainly not). My question is could I still port this to JRuby and use Puma without using config.threadsafe! and still see improvements?

Damien Roche
  • 13,189
  • 18
  • 68
  • 96

1 Answers1

1

Yes you can "The JRuby runtime itself is considered to be threadsafe. From Java, you can use a single runtime safely across threads, provided the code in those threads does not do thread-unsafe. Thread-safety does not mean your code will always run correctly; you will still often need to ensure threads don't step on each others' modifications."

Rajarshi Das
  • 11,778
  • 6
  • 46
  • 74
  • "provided the code in those threads does not do thread-unsafe" -- that's my concern. The gem dependencies could be doing any number of things which are not threadsafe. – Damien Roche Aug 06 '13 at 14:58