mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-24 02:41:33 +00:00
Merge branch 'fix_tsan_warning' into 'master'
Fix TSAN warning See merge request OpenMW/openmw!1102
This commit is contained in:
commit
932184bfc1
1 changed files with 4 additions and 1 deletions
|
@ -46,9 +46,12 @@ WorkQueue::~WorkQueue()
|
||||||
|
|
||||||
void WorkQueue::start(std::size_t workerThreads)
|
void WorkQueue::start(std::size_t workerThreads)
|
||||||
{
|
{
|
||||||
|
{
|
||||||
|
const std::lock_guard lock(mMutex);
|
||||||
|
mIsReleased = false;
|
||||||
|
}
|
||||||
while (mThreads.size() < workerThreads)
|
while (mThreads.size() < workerThreads)
|
||||||
mThreads.emplace_back(std::make_unique<WorkThread>(*this));
|
mThreads.emplace_back(std::make_unique<WorkThread>(*this));
|
||||||
mIsReleased = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorkQueue::stop()
|
void WorkQueue::stop()
|
||||||
|
|
Loading…
Reference in a new issue