浏览代码

Nullkiller AIGateway.cpp consistent and independent thread names, similar to Nullkiller2

Mircea TheHonestCTO 3 月之前
父节点
当前提交
3d94d652db
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      AI/Nullkiller/AIGateway.cpp

+ 2 - 3
AI/Nullkiller/AIGateway.cpp

@@ -603,7 +603,7 @@ void AIGateway::yourTurn(QueryID queryID)
 
 
 	asyncTasks->run([this]()
 	asyncTasks->run([this]()
 	{
 	{
-		ScopedThreadName guard("NKAI::makingTurn");
+		ScopedThreadName guard("NKAI::AIGateway::makingTurn");
 		makeTurn();
 		makeTurn();
 	});
 	});
 }
 }
@@ -845,7 +845,6 @@ bool AIGateway::makePossibleUpgrades(const CArmedInstance * obj)
 
 
 void AIGateway::makeTurn()
 void AIGateway::makeTurn()
 {
 {
-	setThreadName("AIGateway::makeTurn");
 	MAKING_TURN;
 	MAKING_TURN;
 
 
 	auto day = cb->getDate(Date::DAY);
 	auto day = cb->getDate(Date::DAY);
@@ -1628,7 +1627,7 @@ void AIGateway::executeActionAsync(const std::string & description, const std::f
 
 
 	asyncTasks->run([this, description, whatToDo]()
 	asyncTasks->run([this, description, whatToDo]()
 	{
 	{
-		ScopedThreadName guard("NKAI::" + description);
+		ScopedThreadName guard("NKAI::AIGateway::" + description);
 		SET_GLOBAL_STATE(this);
 		SET_GLOBAL_STATE(this);
 		std::shared_lock gsLock(CGameState::mutex);
 		std::shared_lock gsLock(CGameState::mutex);
 		whatToDo();
 		whatToDo();