mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Slightly better thread names
This commit is contained in:
@ -574,6 +574,8 @@ void CServerHandler::startMapAfterConnection(std::shared_ptr<CMapInfo> to)
|
|||||||
|
|
||||||
void CServerHandler::startGameplay(VCMI_LIB_WRAP_NAMESPACE(CGameState) * gameState)
|
void CServerHandler::startGameplay(VCMI_LIB_WRAP_NAMESPACE(CGameState) * gameState)
|
||||||
{
|
{
|
||||||
|
setThreadName("startGameplay");
|
||||||
|
|
||||||
if(CMM)
|
if(CMM)
|
||||||
CMM->disable();
|
CMM->disable();
|
||||||
client = new CClient();
|
client = new CClient();
|
||||||
@ -816,7 +818,7 @@ public:
|
|||||||
|
|
||||||
void CServerHandler::threadHandleConnection()
|
void CServerHandler::threadHandleConnection()
|
||||||
{
|
{
|
||||||
setThreadName("threadHandleConnection");
|
setThreadName("handleConnection");
|
||||||
c->enterLobbyConnectionMode();
|
c->enterLobbyConnectionMode();
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -897,7 +899,7 @@ void CServerHandler::visitForClient(CPackForClient & clientPack)
|
|||||||
void CServerHandler::threadRunServer()
|
void CServerHandler::threadRunServer()
|
||||||
{
|
{
|
||||||
#if !defined(VCMI_MOBILE)
|
#if !defined(VCMI_MOBILE)
|
||||||
setThreadName("threadRunServer");
|
setThreadName("runServer");
|
||||||
const std::string logName = (VCMIDirs::get().userLogsPath() / "server_log.txt").string();
|
const std::string logName = (VCMIDirs::get().userLogsPath() / "server_log.txt").string();
|
||||||
std::string comm = VCMIDirs::get().serverPath().string()
|
std::string comm = VCMIDirs::get().serverPath().string()
|
||||||
+ " --port=" + std::to_string(getHostPort())
|
+ " --port=" + std::to_string(getHostPort())
|
||||||
|
@ -214,7 +214,7 @@ void CConsoleHandler::setColor(EConsoleTextColor::EConsoleTextColor color)
|
|||||||
|
|
||||||
int CConsoleHandler::run() const
|
int CConsoleHandler::run() const
|
||||||
{
|
{
|
||||||
setThreadName("CConsoleHandler::run");
|
setThreadName("consoleHandler");
|
||||||
//disabling sync to make in_avail() work (othervice always returns 0)
|
//disabling sync to make in_avail() work (othervice always returns 0)
|
||||||
{
|
{
|
||||||
TLockGuard _(smx);
|
TLockGuard _(smx);
|
||||||
|
@ -193,6 +193,8 @@ void CVCMIServer::run()
|
|||||||
|
|
||||||
void CVCMIServer::establishRemoteConnections()
|
void CVCMIServer::establishRemoteConnections()
|
||||||
{
|
{
|
||||||
|
setThreadName("establishConnection");
|
||||||
|
|
||||||
//wait for host connection
|
//wait for host connection
|
||||||
while(connections.empty())
|
while(connections.empty())
|
||||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(50));
|
boost::this_thread::sleep_for(boost::chrono::milliseconds(50));
|
||||||
@ -229,6 +231,7 @@ void CVCMIServer::connectToRemote(const std::string & addr, int port)
|
|||||||
|
|
||||||
void CVCMIServer::threadAnnounceLobby()
|
void CVCMIServer::threadAnnounceLobby()
|
||||||
{
|
{
|
||||||
|
setThreadName("announceLobby");
|
||||||
while(state != EServerState::SHUTDOWN)
|
while(state != EServerState::SHUTDOWN)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@ -419,7 +422,7 @@ public:
|
|||||||
|
|
||||||
void CVCMIServer::threadHandleClient(std::shared_ptr<CConnection> c)
|
void CVCMIServer::threadHandleClient(std::shared_ptr<CConnection> c)
|
||||||
{
|
{
|
||||||
setThreadName("CVCMIServer::handleConnection");
|
setThreadName("handleClient");
|
||||||
c->enterLobbyConnectionMode();
|
c->enterLobbyConnectionMode();
|
||||||
|
|
||||||
while(c->connected)
|
while(c->connected)
|
||||||
|
Reference in New Issue
Block a user