diff options
Diffstat (limited to 'source/blender/blenlib/intern/threads.c')
-rw-r--r-- | source/blender/blenlib/intern/threads.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c index 146e1d531f1..686484ef1db 100644 --- a/source/blender/blenlib/intern/threads.c +++ b/source/blender/blenlib/intern/threads.c @@ -729,6 +729,9 @@ void BLI_thread_queue_wait_finish(ThreadQueue *queue) void BLI_begin_threaded_malloc(void) { + /* Used for debug only */ + /* BLI_assert(thread_levels >= 0); */ + if (thread_levels == 0) { MEM_set_lock_callback(BLI_lock_malloc_thread, BLI_unlock_malloc_thread); } @@ -737,6 +740,9 @@ void BLI_begin_threaded_malloc(void) void BLI_end_threaded_malloc(void) { + /* Used for debug only */ + /* BLI_assert(thread_levels >= 0); */ + thread_levels--; if (thread_levels == 0) MEM_set_lock_callback(NULL, NULL); |