mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-10 00:11:43 +08:00
Renamed XThreadUnavailable to XMTThreadUnavailable and derived it
from XBase so it can be caught normally. Changed client and server to handle unavailable threads (in main loop, anyway).
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "CLock.h"
|
||||
#include "CThread.h"
|
||||
#include "CTimerThread.h"
|
||||
#include "XMT.h"
|
||||
#include "XThread.h"
|
||||
#include "CFunctionJob.h"
|
||||
#include "CLog.h"
|
||||
@@ -130,6 +131,14 @@ CServer::mainLoop()
|
||||
} while (false)
|
||||
FINALLY;
|
||||
}
|
||||
catch (XMT& e) {
|
||||
LOG((CLOG_ERR "server error: %s", e.what()));
|
||||
|
||||
// clean up
|
||||
LOG((CLOG_NOTE "stopping server"));
|
||||
FINALLY;
|
||||
throw;
|
||||
}
|
||||
catch (XBase& e) {
|
||||
LOG((CLOG_ERR "server error: %s", e.what()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user