Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>starting from Rails 4, everything would have to run in threaded environment by default</p> </blockquote> <p>This is not 100% correct. Threadsafe Rails is just on by default. If you still deploy on a multi-process app server like passenger(community) or unicorn there will be no difference at all. This change only concerns you, if you deploy on a multi-threaded environment like Puma or Passenger Enterprise > 4.0 </p> <p>In the past if you wanted to deploy on a multi-threaded app server you had to turn on <em>config.threadsafe</em>, which is default now, because all it did had either no effects or also applied to a rails app running in a single process (<a href="http://tenderlovemaking.com/2012/06/18/removing-config-threadsafe.html">Prooflink</a>). </p> <p>But if you do want all the rails 4 <a href="http://blog.phusion.nl/2012/08/03/why-rails-4-live-streaming-is-a-big-deal/">streaming</a> benefits and other real time stuff of the multithreaded deployment then maybe you will find <a href="http://m.onkey.org/thread-safety-for-your-rails">this</a> article interesting. As @Theo sad, for a rails app, you actauly just have to omit mutating static state during a request. While this a simple practice to follow, unfortionatly you cannot be sure about this for every gem you find. As far as i remember Charles Oliver Nutter from the Jruby project had some tipps about it in <a href="http://rubyrogues.com/124-rr-jruby-with-charlie-nutter/">this</a> podcast. </p> <p>And if you want to write a pure concurrent ruby programming, where you would need some data structures which are accessed by more than one thread you maybe will find the <a href="https://github.com/headius/thread_safe">thread_safe</a> gem usefull</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload