ReLinker icon indicating copy to clipboard operation
ReLinker copied to clipboard

Bugfix: fix multi-threading issue

Open catsalty opened this issue 2 years ago • 3 comments

  • change ReLinkerInstance#loadedLibraries to CopyOnWriteArraySet

catsalty avatar Oct 26 '22 10:10 catsalty

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?

benjamin-bader avatar Oct 26 '22 23:10 benjamin-bader

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.

catsalty avatar Oct 27 '22 01:10 catsalty

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

jianglei12138 avatar May 18 '23 03:05 jianglei12138