![]() |
Home | Libraries | People | FAQ | More |
Constructs a connection pool.
connection_pool(
asio::any_io_executor ex,
pool_params
params);
The pool is created in a "not-running" state. Call async_run
to transition to the
"running" state.
The constructed pool is always valid (this->valid() == true
).
The passed executor becomes the pool executor, available through get_executor
. ex
is used as follows:
params.thread_safe ==
true
, ex
is used to build a strand. The strand is used to build internal I/O
objects, like timers.
params.thread_safe ==
false
, ex
is used directly to build internal I/O objects.
params.connection_executor
is empty,
ex
is used to build
individual connections, regardless of the chosen thread-safety mode.
Otherwise, params.connection_executor
is used.
Strong guarantee. Exceptions may be thrown by memory allocations.
Type |
Thrown On |
---|---|
|
If |