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:
David Vacca authored and Facebook Github Bot committed 2019-07-02 14:47:19 -07:00
1 parent e883197807
commit 0e52ab4e1a
2 files changed
+4

No files matched your search

@@ -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: