Boost C++ Libraries

...one 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 a snapshot of the develop branch, built from commit 65ab21cc6f.
PrevUpHomeNext

io_context::run_for

Run the io_context object's event processing loop for a specified duration.

template<
    typename Rep,
    typename Period>
std::size_t run_for(
    const chrono::duration< Rep, Period > & rel_time);

The run_for() function blocks until all work has finished and there are no more handlers to be dispatched, until the io_context has been stopped, or until the specified duration has elapsed.

Parameters

rel_time

The duration for which the call may block.

Return Value

The number of handlers that were executed.


PrevUpHomeNext