mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add synchronization on Binding.schedulerDidFinishTransaction
Summary: This diff ensures only one thread access the Binding.schedulerDidFinishTransaction method Reviewed By: shergin Differential Revision: D15995971 fbshipit-source-id: 31f03803e8829480dd30b9b9148fd09b218ebeab
This commit is contained in:
committed by
Facebook Github Bot
parent
e883197807
commit
0e52ab4e1a
@@ -448,6 +448,8 @@ local_ref<JMountItem::javaobject> createCreateMountItem(
|
||||
|
||||
void Binding::schedulerDidFinishTransaction(
|
||||
MountingCoordinator::Shared const &mountingCoordinator) {
|
||||
std::lock_guard<std::mutex> lock(commitMutex_);
|
||||
|
||||
SystraceSection s("FabricUIManagerBinding::schedulerDidFinishTransaction");
|
||||
long finishTransactionStartTime = getTime();
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ class Binding : public jni::HybridClass<Binding>, public SchedulerDelegate {
|
||||
std::shared_ptr<Scheduler> scheduler_;
|
||||
std::mutex schedulerMutex_;
|
||||
|
||||
std::mutex commitMutex_;
|
||||
|
||||
float pointScaleFactor_ = 1;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user