Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There is a period of time between checking if NativeLoader has been i…
…nitialized, and when we try to perform .init() which means a race condition can occur (as mentioned in facebook/SoLoader#60). This change uses synchronization on the NativeLoader class, and a secondary check to verify that the initialization needs to take place just before we perform it, in order to reduce the window for a race condition to affect client code. When combined with facebook/SoLoader#69 this will remove the race condition from the code because the initialisation inside SoLoader and inside Fresco will both be synchronized on the NativeLoad.class object.
- Loading branch information