Files
openttd-cmclient/src
Patric Stout b45c006ab9 Fix: on startup, NewGRF scan could case race-condition (#9382)
Creating a thread was not thread-safe. The irony.

The video-driver has a function GameLoopPause() which first checks
if the thread is the game-thread or not. For this it needs access
to this->game_thread. This variable is set in StartNewThread().

However, due to timing, it is well possible GameLoopPause() is
called from the thread well before this->game_thread is assigned.

And so we have a race-condition!

Simply solve this by preventing a thread to start till we are
done with our bookkeeping.
2021-06-17 20:10:40 +02:00
..
2021-06-15 18:57:22 +00:00
2021-05-15 10:16:10 +02:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2021-03-01 21:56:26 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2021-04-22 22:57:00 +02:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2020-05-06 09:54:36 +01:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2020-01-01 10:19:12 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00
2019-11-10 17:59:20 +00:00