Roger Pack wrote:
> I'm sure this has been discussed before, but...should there be
> anything to help in the case that two threads require the same file at
> the same time [i.e. the second thread requires a file while a first is
> still loading it and thus continues assuming the file was successfully
> loaded]?
> Here's a recent discussion on it [bottom of thread]
> http://groups.google.com/group/rubyonrails-core/browse_thread/thread/ff25b78c21766492/cc7f78e445fa6806?lnk=gst&q=rogerdpack#cc7f78e445fa6806

We've had some long discussions about this on the JRuby lists as well. 
The general determination we came to was that we could safely guarantee 
only one thread attempted to *start* requiring a file, but could not 
guarantee that by the time a require call completed the target file had 
finished loading.

If you try to wrap requiring in a mutex, even a very localized one, 
there's a number of deadlock scenarios.

- Charlie