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
Destructor.
~pooled_connection();
If this->valid() == true,
returns the owned connection to the pool and marks it as pending reset.
If your connection doesn't need to be reset (e.g. because you didn't mutate
session state), use return_without_reset.
If the connection_pool object that *this references
has been constructed with adequate executor configuration, this function
is safe to be called concurrently with connection_pool::async_run, connection_pool::async_get_connection, connection_pool::cancel and return_without_reset on other
pooled_connection objects.