Don't use the _queue.write if it's not needed.

This commit is contained in:
Relintai 2021-10-31 12:12:27 +01:00
parent c0a2d3bbe5
commit 59ba27f161

View File

@ -165,7 +165,7 @@ bool ThreadPool::has_job(const Ref<ThreadPoolJob> &job) {
} }
for (int i = _current_queue_head; i < _current_queue_tail; ++i) { for (int i = _current_queue_head; i < _current_queue_tail; ++i) {
if (_queue.write[i] == job) { if (_queue[i] == job) {
_THREAD_SAFE_UNLOCK_ _THREAD_SAFE_UNLOCK_