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

Bugfix: fix multi-threading issue #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

catsalty
Copy link

  • change ReLinkerInstance#loadedLibraries to CopyOnWriteArraySet

* change ReLinkerInstance#loadedLibraries to  CopyOnWriteArraySet
@benjamin-bader
Copy link
Contributor

Thanks for the PR! It's hard to understand what problem this solves; can you expand on that, and on why COW is the right solution?

@catsalty
Copy link
Author

Thanks for the PR! It's hard to understand what problem this solves; can you expand on that, and on why COW is the right solution?

When ReLinkerInstance#loadLibraryInternal() is executed in multiple threads, loadedLibraries determines whether the loaded library is unreliable. Here, a thread-safe set collection can be used to avoid this problem.

Copy link

@hughreddick hughreddick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just looking

@jianglei12138
Copy link

Any update? same exception when load so in multi thread.

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.

4 participants