File indexing completed on 2024-06-02 05:39:08
0001 /* 0002 SPDX-FileCopyrightText: 2018 Ivan Čukić <ivan.cukic(at)kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef VOY_EVENT_LOOP_H 0008 #define VOY_EVENT_LOOP_H 0009 0010 #include "asio/service.h" 0011 0012 namespace voy::event_loop { 0013 0014 using voy::engine::asio::service; 0015 0016 inline void run() 0017 { 0018 service::instance().run(); 0019 } 0020 0021 template <typename F> 0022 inline void invoke_later(F&& f) 0023 { 0024 service::instance().invoke_later(std::forward<F>(f)); 0025 } 0026 0027 } // namespace voy::event_loop 0028 0029 #endif // include guard 0030