mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-07 09:27:29 +08:00
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:
committed by
Facebook Github Bot
parent
6eb5bd381c
commit
e02a24b738
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user