boostorg / mysql

MySQL C++ client based on Boost.Asio
https://www.boost.org/doc/libs/master/libs/mysql
Boost Software License 1.0
259 stars 33 forks source link

connection_pool: proper execution semantics for thread_safe=false #361

Closed anarthal closed 1 month ago

anarthal commented 1 month ago

While async_get_connection respects the usual Asio semantics for pools with thread_safe=false, connection tasks, which are technically children agents of async_run, do not. The proper semantics should be:

These should be documented.

EDIT: following the discussion in Slack, and given that using async_run token's for connection tasks is difficult, the current approach is good, but should be documented.