From e02a24b73842f651436d2cd700a40d0253c8f332 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Wed, 14 Nov 2018 09:43:05 -0800 Subject: [PATCH] Dispatch events asynchronously Summary: This diff fixes the dispaching of Async Events in Android C++ layer to ensure proper asynchronouns dispatching in the JS thread. Reviewed By: shergin Differential Revision: D12988348 fbshipit-source-id: 7aa60b11e2c264c2e68354ed83eb75139060d211 --- ReactCommon/fabric/events/EventBeat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactCommon/fabric/events/EventBeat.h b/ReactCommon/fabric/events/EventBeat.h index 2f86600a4..448da6dee 100644 --- a/ReactCommon/fabric/events/EventBeat.h +++ b/ReactCommon/fabric/events/EventBeat.h @@ -58,13 +58,13 @@ class EventBeat { */ void setFailCallback(const FailCallback &failCallback); - protected: /* * Should be used by sublasses to send a beat. * Receiver might ignore the call if a beat was not requested. */ void beat(jsi::Runtime &runtime) const; + protected: BeatCallback beatCallback_; FailCallback failCallback_; mutable std::atomic isRequested_{false};