| 121 | } |
| 122 | Context& context() override { return m_context; } |
| 123 | void startLoop(const char* exe_name) |
| 124 | { |
| 125 | if (m_loop) return; |
| 126 | std::promise<void> promise; |
| 127 | m_loop_thread = std::thread([&] { |
| 128 | util::ThreadRename("capnp-loop"); |
| 129 | mp::LogOptions opts = { |
| 130 | .log_fn = IpcLogFn, |
| 131 | .log_level = GetRequestedIPCLogLevel() |
| 132 | }; |
| 133 | m_loop.emplace(exe_name, std::move(opts), &m_context); |
| 134 | m_loop_ref.emplace(*m_loop); |
| 135 | promise.set_value(); |
| 136 | m_loop->loop(); |
| 137 | m_loop.reset(); |
| 138 | }); |
| 139 | promise.get_future().wait(); |
| 140 | } |
| 141 | Context m_context; |
| 142 | std::thread m_loop_thread; |
| 143 | //! EventLoop object which manages I/O events for all connections. |
nothing calls this directly
no test coverage detected