You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
PS: I already implemented this stuff and I am using it in a production environment.
I use it in a "search dialog" where the user sees the records matching the search criteria immediately as he types the criteria itself: whenever the criteria changes while there already is a query in progress, I stop the current query via a cancel token and start the new query with the updated search criteria. I think this is an essential feature if you want your application user interface to be always responsive.
This is the idea:
while this query is running in a task:
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)
The text was updated successfully, but these errors were encountered: