Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved thread safety in remote fetcher #6

Closed
wants to merge 1 commit into from
Closed

Improved thread safety in remote fetcher #6

wants to merge 1 commit into from

Conversation

anibali
Copy link
Contributor

@anibali anibali commented Nov 7, 2010

The current process of caching connections in @connections causes problems across multiple threads, due to unexpected socket closing. By adding the current thread's ID to cache keys this problem may be avoided without affecting single-threaded applications.

@jbarnette
Copy link
Contributor

Thanks, will you please open up a ticket pointing here in the RubyGems tracker?

http://rubyforge.org/tracker/?group_id=126

@qrush
Copy link
Member

qrush commented Dec 10, 2010

Just curious, where is the RemoteFetcher being used in a multi-thread environment? Not saying that we shouldn't support it..but curious as to how this bug was found :)

@anibali
Copy link
Contributor Author

anibali commented Dec 10, 2010

I stumbled upon this issue through gem-dependent (see https://github.com/grosser/gem-dependent/issues/issue/3). The problem is currently circumvented by spawning multiple processes, which is very wasteful of resources in comparison to threads.

@zenspider
Copy link
Contributor

applied

nobu referenced this pull request in nobu/rubygems Jan 12, 2014
Closes #6.

Signed-off-by: Brian Ford <bford@engineyard.com>
nobu referenced this pull request in nobu/rubygems Feb 7, 2014
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants