Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
connection_pool::connection_pool (2 of 4 overloads)

Constructs a connection pool.

Synopsis
connection_pool(
    asio::any_io_executor ex,
    pool_params params);
Description

Both internal I/O objects and connections are constructed using the passed executor.

The pool is created in a "not-running" state. Call async_run to transition to the "running" state. Calling async_get_connection in the "not-running" state will fail with client_errc::cancelled.

The constructed pool is always valid (this->valid() == true).

Exception safety

Strong guarantee. Exceptions may be thrown by memory allocations.

Exceptions

Type

Thrown On

std::invalid_argument

If params contains values that violate the rules described in pool_params.


PrevUpHomeNext