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
This commit is contained in:
David Vacca
2018-11-14 09:43:05 -08:00
committed by Facebook Github Bot
parent 6eb5bd381c
commit e02a24b738

View File

@@ -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<bool> isRequested_{false};