mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Fixing Race condition that happens with _wasBatchActive
Summary: Issue Fix: #13485 Yet another race condition that was found by XCode's Thread Sanitizer. Happens because wasBatchActive is read/write from multiple threads at the same time - opened UIExplorer and see it works - npm run test pass - tested on own project as well Signed CLA Closes https://github.com/facebook/react-native/pull/13505 Differential Revision: D4906096 Pulled By: javache fbshipit-source-id: 5d4329aafcfe9491ce0188fa1e2dd71e09b31031
This commit is contained in:
committed by
Facebook Github Bot
parent
9b882a3b44
commit
460e77d47d
@@ -47,7 +47,7 @@ typedef NS_ENUM(NSUInteger, RCTBridgeFields) {
|
||||
|
||||
@implementation RCTBatchedBridge
|
||||
{
|
||||
BOOL _wasBatchActive;
|
||||
std::atomic_bool _wasBatchActive;
|
||||
NSMutableArray<dispatch_block_t> *_pendingCalls;
|
||||
NSDictionary<NSString *, RCTModuleData *> *_moduleDataByName;
|
||||
NSArray<RCTModuleData *> *_moduleDataByID;
|
||||
Reference in New Issue
Block a user