| 317 | template <typename Allocator, uintptr_t Bits> |
| 318 | template <typename Function, typename OtherAllocator> |
| 319 | void io_context::basic_executor_type<Allocator, Bits>::defer( |
| 320 | Function&& f, const OtherAllocator& a) const |
| 321 | { |
| 322 | // Allocate and construct an operation to wrap the function. |
| 323 | typedef detail::executor_op<decay_t<Function>, |
| 324 | OtherAllocator, detail::operation> op; |
| 325 | typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 }; |
| 326 | p.p = new (p.v) op(static_cast<Function&&>(f), a); |
| 327 | |
| 328 | BOOST_ASIO_HANDLER_CREATION((*context_ptr(), *p.p, |
| 329 | "io_context", context_ptr(), 0, "defer")); |
| 330 | |
| 331 | context_ptr()->impl_.post_immediate_completion(p.p, true); |
| 332 | p.v = p.p = 0; |
| 333 | } |
| 334 | #endif // !defined(BOOST_ASIO_NO_TS_EXECUTORS) |
| 335 | |
| 336 | inline boost::asio::io_context& io_context::service::get_io_context() |
nothing calls this directly
no test coverage detected