Backport a fix for concurrent requires #833

Merged
merged 1 commit into from Mar 15, 2014

2 participants

@nagachika nagachika Backport 16fc8e8 to 2.0 branch.
Restore concurrent requires

When #8374 was fixed all requires were serialized, so one thread would
be blocked waiting for gem resolution (if any) and require in another
thread.  This is undesirable for JRuby, in particular.

The monitor protecting the RubyGems internals only needs to cover gem
activation and modifying $LOAD_PATH, not requiring files.

Now the monitor is released before calling the original Kernel#require
which allows other threads to require files without waiting for
RubyGems.

Fixes #640

See also #637
935e50b
@evanphx evanphx pushed a commit to ruby/ruby that referenced this pull request Feb 22, 2014
@nagachika nagachika (merged partially from r42927)
* lib/rubygems/core_ext/kernel_require.rb: Backport a fix for concurrent
  requires. [ruby-core:58918] [Backport #9224]
  see also rubygems/rubygems#833


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
f7745a4
@zzak zzak merged commit ec4eef2 into rubygems:2.0 Mar 15, 2014

1 check failed

Details default The Travis CI build failed
@hsbt hsbt pushed a commit to ruby/ruby that referenced this pull request Mar 10, 2015
@nagachika nagachika (merged partially from r42927)
* lib/rubygems/core_ext/kernel_require.rb: Backport a fix for concurrent
  requires. [ruby-core:58918] [Backport #9224]
  see also rubygems/rubygems#833


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
215994d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment