include/boost/corosio/native/native_scheduler.hpp

100.0% Lines (2/2) 100.0% List of functions (2/2) -% Branches (0/0)
f(x) Functions (2)
Line TLA Hits Source Code
1 //
2 // Copyright (c) 2026 Steve Gerbino
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // Official repository: https://github.com/cppalliance/corosio
8 //
9
10 #ifndef BOOST_COROSIO_NATIVE_NATIVE_SCHEDULER_HPP
11 #define BOOST_COROSIO_NATIVE_NATIVE_SCHEDULER_HPP
12
13 #include <boost/corosio/detail/scheduler.hpp>
14
15 namespace boost::corosio::detail {
16
17 class timer_service;
18
19 /** Cache service pointers for native backend schedulers.
20
21 Sits between @ref scheduler and the concrete backend schedulers,
22 storing service pointers that would otherwise require a virtual
23 call or service lookup on every timer operation.
24
25 @see scheduler
26 */
27 606x struct native_scheduler : scheduler
28 {
29 /// Store the timer service pointer, set during construction.
30 606x timer_service* timer_svc_ = nullptr;
31 };
32
33 } // namespace boost::corosio::detail
34
35 #endif
36