util/threadpool: Don't hold work endlessly after processing it

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2020-09-10 09:53:02 +02:00
parent a3b526145c
commit 36976cb550
1 changed files with 3 additions and 0 deletions

View File

@ -112,6 +112,9 @@ void util::threadpool::work()
reinterpret_cast<ptrdiff_t>(local_work->_data.get()));
}
}
// Remove our reference to the work unit.
local_work.reset();
}
_worker_idx.fetch_sub(1);