Fix race condition in generator.cpp

Authored by tobiasdeiminger on Jan 30 2020, 8:28 AM.

Description

Fix race condition in generator.cpp

The check whether to allocate a new QMutex was unprotected.
Two threads may check and allocate concurrently, but only one pointer gets
remembered, the other one will leak. In worst case the returned
mutex is different for two threads, so that two threads try to
synchronize by using two different mutexes.

Details

Committed
tobiasdeimingerJan 30 2020, 8:42 AM
Parents
R223:593803b0a1d9: Fix render stop and high load due to timing issue
Branches
Unknown
Tags
Unknown