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

Method create

test/unit_tests/endpoint_tests/test_timer.cpp:90–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88
89public:
90 static std::shared_ptr<TimeboxedOperation> create(boost::asio::io_context& io_, return_channel channel_) {
91 auto p = std::make_shared<TimeboxedOperation>(hidden{}, io_, std::move(channel_));
92 (void)p->timer_->set_task([weak_ref = p->weak_from_this()] {
93 if (auto self = weak_ref.lock(); self) {
94 self->timer_expired();
95 }
96 return false;
97 });
98 return p;
99 }
100 TimeboxedOperation([[maybe_unused]] hidden, boost::asio::io_context& _io, return_channel channel_) :
101 timer_(timer::create(_io, 12ms, [] { return false; })), answer_(std::move(channel_)) { }
102

Callers

nothing calls this directly

Calls 3

timer_expiredMethod · 0.95
set_taskMethod · 0.80
lockMethod · 0.80

Tested by

no test coverage detected