Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.


Request the io_service to invoke the given handler and return immediately.

    typename CompletionHandler>
void-or-deduced post(
    CompletionHandler handler);

This function is used to ask the io_service to execute the given handler, but without allowing the io_service to call the handler from inside this function.

The io_service guarantees that the handler will only be called in a thread in which the run(), run_one(), poll() or poll_one() member functions is currently being invoked.



The handler to be called. The io_service will make a copy of the handler object as required. The function signature of the handler must be:

void handler();


This function throws an exception only if:

throws an exception.