mysql
mysql copied to clipboard
Per-operation cancellation in connection_pool
Per-operation cancellation for async_run and async_get_connection doesn't do the right thing. It should:
async_run: same thing asconnection_pool::cancel. This is partial cancellation.async_get_connection: mark the operation as cancelled, then cancel the timer. Dispatch this via the pool executor. This is total cancellation.
Document this.
Now that asio::cancel_after and similar tokens exist, this is becoming more important. It may make sense to get rid of the overloads with a timeout and let cancel_after do the job.