Browse Source
The database queries, initiated by list models, must be executed asynchronously (on a thread different from the UI thread). When a list model is destroyed (from the UI thread), some database queries might still be executing. It would be incorrect for the list model to wait for them (it would block the UI thread), so they must be executed on an external thread pool. Since the queries themselves require the medialib to be executed, they must not outlive it (or the asynchronous code might crash). Therefore, the right scope for executing asynchronous queries is the MediaLib instance. Signed-off-by: Pierre Lamot <pierre@videolabs.io>pull/119/head
committed by
Pierre Lamot
2 changed files with 7 additions and 0 deletions
Loading…
Reference in new issue