mirror of
https://github.com/koreader/koreader.git
synced 2025-12-24 12:14:05 +01:00
wait for background thread before free()ing koptcontext
This should prevent freeing resources that are actually in use in a background thread.
This commit is contained in:
@@ -23,6 +23,7 @@ local ContextCacheItem = CacheItem:new{}
|
||||
|
||||
function ContextCacheItem:onFree()
|
||||
if self.kctx.free then
|
||||
KoptInterface:waitForContext(self.kctx)
|
||||
DEBUG("free koptcontext", self.kctx)
|
||||
self.kctx:free()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user