mirror of https://github.com/OpenTTD/OpenTTD
Codefix: data race in case of a spurious wake up
parent
1eddd7fed0
commit
d07d75229b
|
@ -83,7 +83,7 @@ struct PacketWriter : SaveFilter {
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> lock(this->mutex);
|
std::unique_lock<std::mutex> lock(this->mutex);
|
||||||
|
|
||||||
if (this->cs != nullptr) this->exit_sig.wait(lock);
|
while (this->cs != nullptr) this->exit_sig.wait(lock);
|
||||||
|
|
||||||
/* This must all wait until the Destroy function is called. */
|
/* This must all wait until the Destroy function is called. */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue