KeepSafe / ReLinker

A robust native library loader for Android.
Apache License 2.0
3.23k stars 371 forks source link

Bugfix: fix multi-threading issue #102

Open catsalty opened 2 years ago

catsalty commented 2 years ago
benjamin-bader commented 2 years ago

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 commented 2 years ago

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.

jianglei12138 commented 1 year ago

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