mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-18 17:15:14 +01:00
Codefix: data race in case of a spurious wake up
This commit is contained in:
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
Block a user