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:
Hans-Werner Hilse
2014-11-22 14:43:27 +00:00
parent 9b5ff4ca41
commit f9f97163e8

View File

@@ -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