| 56 | } |
| 57 | |
| 58 | ExampleOwner([[maybe_unused]] hidden _, boost::asio::io_context& _io) : |
| 59 | // create a timer with a dummy task to ensure the shared_ptr is receiving its memory in the ctor and can therefore be |
| 60 | // used from any thread without further inspection |
| 61 | timer_(timer::create(_io, 12ms, [] { return false; })) { } |
| 62 | |
| 63 | // Because the timer has a thread-safe interface, the shared_ptr to the timer is const, and the task is setup is ensured |
| 64 | // in a dedicated create function there is no need for synchronization primitives when using the timer itself. |
nothing calls this directly
no outgoing calls
no test coverage detected