mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Added semi-workaround method for network thread shutdown:
Currently closing game while network thread is waiting for something is very bug-prone, since network thread may resume during shutdown and access partially destroyed client state. Now if exit has been requested, the very first step would be semi- graceful shutdown of network thread (via exception throwing). This may in theory skip some cleanup in non-RAII code, but since game is shutting down this does not matters much. This logic applies to: - shutting down while network thread is waiting for dialogs - shuttind down while network thread waiting for animations in combat
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../../lib/GameConstants.h"
|
||||
#include "../../lib/CRandomGenerator.h"
|
||||
#include "../../lib/CondSh.h"
|
||||
#include "../ConditionalWait.h"
|
||||
|
||||
std::shared_ptr<CMainMenu> CMM;
|
||||
ISelectionScreenInfo * SEL;
|
||||
|
||||
Reference in New Issue
Block a user