| 88 | |
| 89 | public: |
| 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 |
nothing calls this directly
no test coverage detected