SQLite Forum

Cancelling the query
I second Keith's reply, and respond only to add to it.

You will be better off, over your multi-threaded programming life, if you take terminating threads out of your repertoire. Arrange for signals of various kinds to be passed between threads so that they know what do, synchronized to their own execution. That may include their own demise, gently effected by returning, often after doing whatever resource cleanup is appropriate. Keith's suggestion is aligned with that approach.

Think of yourself as the orchestrator rather than the forcer.