summaryrefslogtreecommitdiffstats
path: root/src/util/disk_cache.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-10-23 16:15:37 -0400
committerMarek Olšák <[email protected]>2019-10-23 20:22:50 -0400
commite096011def908b4ac08c8e7437ffaf8bd7f46819 (patch)
tree4bd1e0984a11f067f7e74a8b09383ea56e1ba039 /src/util/disk_cache.c
parent8dadef2ec54b23a1f34cb0e5f1ff7f60b5937e85 (diff)
util/disk_cache: finish all queue jobs in destroy instead of killing them
If there are queued shaders to be written to disk, wait for that. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/util/disk_cache.c')
-rw-r--r--src/util/disk_cache.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index 77af64ed3b0..0cd92ca2d5b 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -440,6 +440,7 @@ void
disk_cache_destroy(struct disk_cache *cache)
{
if (cache && !cache->path_init_failed) {
+ util_queue_finish(&cache->cache_queue);
util_queue_destroy(&cache->cache_queue);
munmap(cache->index_mmap, cache->index_mmap_size);
}