Pause the game instead of blocking when link graph jobs lag.
Check if the job is still running one date fract tick before it is due to join and if so pause the game until its done. This avoids the main thread being blocked on a thread join. Show if pause is due to link graph job in status bar, update network messages. This does not apply for network clients.
This commit is contained in:
@@ -62,6 +62,7 @@ enum PauseMode {
|
||||
PM_PAUSED_ERROR = 1 << 3, ///< A game paused because a (critical) error
|
||||
PM_PAUSED_ACTIVE_CLIENTS = 1 << 4, ///< A game paused for 'min_active_clients'
|
||||
PM_PAUSED_GAME_SCRIPT = 1 << 5, ///< A game paused by a game script
|
||||
PM_PAUSED_LINK_GRAPH = 1 << 6, ///< A game paused due to the link graph schedule lagging
|
||||
|
||||
/** Pause mode bits when paused for network reasons. */
|
||||
PMB_PAUSED_NETWORK = PM_PAUSED_ACTIVE_CLIENTS | PM_PAUSED_JOIN,
|
||||
|
Reference in New Issue
Block a user