Asynchronous DBAPI

Forgive me for being dumb, but wouldn’t simply closing the connection do the trick?

What would you have the driver do if a task that is running a query gets cancelled?