Autload thread safety in Ruby 2.0?

196 views
Skip to first unread message

Josh Jordan

unread,
Jun 15, 2013, 9:10:10 PM6/15/13
to rubyonra...@googlegroups.com
Jose Valim implies that autoloading is threadsafe in Ruby 2.0:

The issue with this approach is that it is not thread-safe, except for latest JRuby versions (since 1.7) and Ruby master (2.0)
 
http://blog.plataformatec.com.br/2012/08/eager-loading-for-greater-good

However, the autoload bug ticket filed against Ruby (http://bugs.ruby-lang.org/issues/921) was closed and refers to a forum post wherein Matz recommends not to use autload (http://www.ruby-forum.com/topic/3036681).

Does anyone have any light to shed on this discrepancy? 

Rick

unread,
Jun 16, 2013, 9:14:24 AM6/16/13
to rubyonra...@googlegroups.com
Here's a link that's a little more current that sheds some light on the issue: https://github.com/rkh/rack-protection/issues/45

josh....@gmail.com

unread,
Jun 16, 2013, 11:29:55 AM6/16/13
to rubyonra...@googlegroups.com
Thanks, Rick. I've asked the question on that thread as well. It seems to suffer from the same issue: its just a claim that appears to conflict with Matz's implication from the same post I included in my original question.


--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/cD3Ha2m-esA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/10b01939-6267-4347-b32b-7b52c31e4f85%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages