.. _program_listing_file_BackendLibfabric_SyncSignalWrapper.hpp: Program Listing for File SyncSignalWrapper.hpp ============================================== |exhale_lsh| :ref:`Return to documentation for file ` (``BackendLibfabric/SyncSignalWrapper.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef NETIO3BACKEND_BACKENDLIBFABRIC_SYNCSIGNALWRAPPER_HPP #define NETIO3BACKEND_BACKENDLIBFABRIC_SYNCSIGNALWRAPPER_HPP #include #include #include "netio3-backend/EventLoop/EventSignalHandle.hpp" #include "netio3-backend/EventLoop/BaseEventLoop.hpp" namespace netio3::libfabric { class SyncSignalWrapper { public: explicit SyncSignalWrapper(BaseEventLoop* event_loop, std::function cb, bool use_semaphore); ~SyncSignalWrapper(); SyncSignalWrapper(const SyncSignalWrapper&) = delete; SyncSignalWrapper(SyncSignalWrapper&&) = delete; SyncSignalWrapper& operator=(const SyncSignalWrapper&) = delete; SyncSignalWrapper& operator=(SyncSignalWrapper&&) = delete; void fire() const; private: void on_unregistered(); BaseEventLoop* m_event_loop; std::unique_ptr m_signal; std::atomic_bool m_unregistered{false}; }; } // namespace netio3::libfabric #endif // NETIO3BACKEND_BACKENDLIBFABRIC_SYNCSIGNALWRAPPER_HPP