Open anarthal opened 8 months ago
Per-operation cancellation for async_run and async_get_connection doesn't do the right thing. It should:
async_run
async_get_connection
connection_pool::cancel
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.
asio::cancel_after
cancel_after
Per-operation cancellation for
async_run
andasync_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.