Dexie.js icon indicating copy to clipboard operation
Dexie.js copied to clipboard

Abortable live query

Open dfahlander opened this issue 4 years ago • 0 comments

Aborts liveQueries if unsubscribing from a liveQuery observable while querier is being executed.

Currently, when a live query is unsubscribed from while the querier is being executed, we let the querier continue it's execution but ignore it's result.

This PR will abort the querier eagerly for the purpose of unloading the db from unnecessary requests.

There might be a risk that aborting ongoing transactions could trigger possible bugs in native indexedDB implementations. Another risk is that there would be unhandled promise rejections when unsubscribing. These things needs to be tested before merging this query.

dfahlander avatar Dec 03 '21 15:12 dfahlander