MCPcopy Create free account
hub / github.com/COVESA/vsomeip / ExampleOwner

Method ExampleOwner

test/unit_tests/endpoint_tests/test_timer.cpp:58–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected