...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Stops any current outstanding operation and marks the pool as cancelled.
void cancel();
This function has the following effects:
async_run
operation, if any,
which will complete with a success error code.
async_get_connection
operations.
async_get_connection
calls will fail immediately.
This function will return immediately, without waiting for the cancelled operations to complete.
You may call this function any number of times. Successive calls will have no effect.
this->valid() == true
Basic guarantee. Memory allocations and acquiring mutexes may throw.
Reads the internal state handle. Mutates the pool state. If the pool was built with thread-safety enabled, it can be called concurrently with other functions that don't modify the state handle.