/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include #include #include #include namespace facebook { namespace react { /* * Event beat that associated with MessageQueueThread. */ class MessageQueueEventBeat: public EventBeat { public: MessageQueueEventBeat(const std::shared_ptr &messageQueueThread); ~MessageQueueEventBeat(); void induce() const override; private: const std::shared_ptr messageQueueThread_; CFRunLoopObserverRef mainRunLoopObserver_; mutable std::atomic isBusy_ {false}; }; } // namespace react } // namespace facebook