-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
This is the idea:
while this query is running in a task:
connection.Table<MyRecType>()
.CancelToken (tok)
.ToList();I want another "control task" to be able to abort that query by simply calling CancTokSource.Cancel().
Spoiler: I am already in the process of implementing this feauture: I am checking the status of the cancellation source inside the loops that fetch records, but I am also using the sqlite3_interrupt call to abort any "server-side" processing.
I will issue a pull request when it will be finished. Currently I have implemented cancellable versions of methods of SqliteConnection
(methods: DeferredQuery, Query, QueryScalars, and all linq queries initiated by Table (by adding the CancelToken method shown in my example)
I still have to tackle SqliteAsyncConnection.
I will issue a Pull request as soon as possible... If I can avoid doing some "actual" work.
(in case someone wants to give it a try or give me some early feedback: https://github.com/csm101/sqlite-net/tree/cancelable_queries)