mysql icon indicating copy to clipboard operation
mysql copied to clipboard

Per-operation cancellation in connection_pool

Open anarthal opened this issue 1 year ago • 1 comments

Per-operation cancellation for async_run and async_get_connection doesn't do the right thing. It should:

  • async_run: same thing as connection_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.

anarthal avatar Dec 20 '23 13:12 anarthal

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.

anarthal avatar Aug 10 '24 10:08 anarthal