Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Protect access to RCTTurboModuleCache
Summary: The `_rctTurboModuleCache` `std::unordered_map` can be accessed by multiple threads at the same time via the `provideRCTTurboModule` method. Since `provideRCTTurboModule` both reads and writes to `_rctTurboModuleCache`, this is really bad because we could end up reading from `_rctTurboModuleCache` while it's in an invalid state. Therefore, in this diff, I'm making it so that only one thread at a time can enter `provideRCTTurboModule`. Reviewed By: fkgozali Differential Revision: D15609987 fbshipit-source-id: e24e1f5cc2351d8cbb820b7a97074aacd06eec9d
- Loading branch information