void async_wait( implementation_type& impl, Handler& handler )
            {
                // Allocate and construct an operation to wrap the handler.
                typedef wait_handler<Handler> op;
                typename op::ptr p = {asio::detail::addressof( handler ),
                                      asio_handler_alloc_helpers::allocate( sizeof( op ), handler ), 0};
                p.p = new ( p.v ) op( handler );

                ASIO_HANDLER_CREATION( ( p.p, "object_handle", &impl, "async_wait" ) );

                start_wait_op( impl, p.p );
                p.v = p.p = 0;
            }
Esempio n. 2
0
  void async_wait(implementation_type& impl, Handler handler)
  {
    // Allocate and construct an operation to wrap the handler.
    typedef signal_handler<Handler> op;
    typename op::ptr p = { boost::addressof(handler),
      boost_asio_handler_alloc_helpers::allocate(
        sizeof(op), handler), 0 };
    p.p = new (p.v) op(handler);

    BOOST_ASIO_HANDLER_CREATION((p.p, "signal_set", &impl, "async_wait"));

    start_wait_op(impl, p.p);
    p.v = p.p = 0;
  }
  void async_wait(implementation_type& impl, Handler& handler)
  {
    // Allocate and construct an operation to wrap the handler.
    typedef wait_handler<Handler> op;
    typename op::ptr p = { asio::detail::addressof(handler),
      op::ptr::allocate(handler), 0 };
    p.p = new (p.v) op(handler);

    ASIO_HANDLER_CREATION((io_context_.context(), *p.p, "object_handle",
          &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "async_wait"));

    start_wait_op(impl, p.p);
    p.v = p.p = 0;
  }