title: Ruby Thread local variables
body: <p>Ruby has native support for thread local variables since version <strong>2.0</strong>. However active_support/core_ext/thread.rb implements this feature in pure ruby for support of thread locals in earlier versions of Ruby. So, I wonder why should we use mutex in <strong>_locals</strong> method:</p>
  
  <p><a href="https://github.com/rails/rails/blob/ec1227a9cc682ebf796689ef0f329038162c421b/activesupport/lib/active_support/core_ext/thread.rb#L76" rel="nofollow">https://github.com/rails/rails/blob/ec1227a9cc682ebf796689ef0f329038162c421b/activesupport/lib/active_support/core_ext/thread.rb#L76</a></p>