diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-19 13:30:21 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-19 13:31:26 +0300 |
commit | 0f171d4a2599f9c8d1205e319de1024bf030f762 (patch) | |
tree | 7119054e9abb18cd01fca2d3fab594c0df36e1cd /source/blender/blenlib/BLI_threads.h | |
parent | 1cf1f4889344528a4b16c0f5434342321d5ca13c (diff) |
BLI_threads Queue: add `BLI_thread_queue_is_empty()`.
Avoids counting the whole queue when we only want to check whether it is empty or not!
Diffstat (limited to 'source/blender/blenlib/BLI_threads.h')
-rw-r--r-- | source/blender/blenlib/BLI_threads.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h index 18b8feaa99c..b2ead15af22 100644 --- a/source/blender/blenlib/BLI_threads.h +++ b/source/blender/blenlib/BLI_threads.h @@ -175,6 +175,7 @@ void BLI_thread_queue_push(ThreadQueue *queue, void *work); void *BLI_thread_queue_pop(ThreadQueue *queue); void *BLI_thread_queue_pop_timeout(ThreadQueue *queue, int ms); int BLI_thread_queue_size(ThreadQueue *queue); +bool BLI_thread_queue_is_empty(ThreadQueue *queue); void BLI_thread_queue_wait_finish(ThreadQueue *queue); void BLI_thread_queue_nowait(ThreadQueue *queue); |