From 59ba27f161d28a2a4f19b46c470c27614a1f1f8d Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 31 Oct 2021 12:12:27 +0100 Subject: [PATCH] Don't use the _queue.write if it's not needed. --- thread_pool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thread_pool.cpp b/thread_pool.cpp index f7a700f..35adead 100644 --- a/thread_pool.cpp +++ b/thread_pool.cpp @@ -165,7 +165,7 @@ bool ThreadPool::has_job(const Ref &job) { } for (int i = _current_queue_head; i < _current_queue_tail; ++i) { - if (_queue.write[i] == job) { + if (_queue[i] == job) { _THREAD_SAFE_UNLOCK_