Skip to content

Conversation

@benstevens48
Copy link

This is an attempt to fix issue #663. I have tried to do it in such a way as to improve concurrency by locking for less of the time rather than more. The basic idea is quite simple, although it ended up being slightly more complicated than I would have liked.

The basic idea is that if two threads happen to want to create a wrapper around the same resource at the same time, which seems very unlikely, then let them do the same work in parallel, but then only return one of the created wrappers and discard the other. This allows us to release the lock for the construction of the wrapper.

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.

1 participant