(cobra bots) set thread name for utility threads
This commit is contained in:
		@@ -8,6 +8,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <ixcobra/IXCobraConnection.h>
 | 
					#include <ixcobra/IXCobraConnection.h>
 | 
				
			||||||
#include <ixcore/utils/IXCoreLogger.h>
 | 
					#include <ixcore/utils/IXCoreLogger.h>
 | 
				
			||||||
 | 
					#include <ixwebsocket/IXSetThreadName.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <algorithm>
 | 
					#include <algorithm>
 | 
				
			||||||
#include <chrono>
 | 
					#include <chrono>
 | 
				
			||||||
@@ -54,6 +55,7 @@ namespace ix
 | 
				
			|||||||
                      &receivedCountPerMinutes,
 | 
					                      &receivedCountPerMinutes,
 | 
				
			||||||
                      &minuteCounter,
 | 
					                      &minuteCounter,
 | 
				
			||||||
                      &stop] {
 | 
					                      &stop] {
 | 
				
			||||||
 | 
					            setThreadName("Bot progress");
 | 
				
			||||||
            while (!stop)
 | 
					            while (!stop)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                //
 | 
					                //
 | 
				
			||||||
@@ -94,6 +96,7 @@ namespace ix
 | 
				
			|||||||
        std::thread t1(timer);
 | 
					        std::thread t1(timer);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        auto heartbeat = [&sentCount, &receivedCount, &stop, &enableHeartbeat, &heartBeatTimeout, &fatalCobraError] {
 | 
					        auto heartbeat = [&sentCount, &receivedCount, &stop, &enableHeartbeat, &heartBeatTimeout, &fatalCobraError] {
 | 
				
			||||||
 | 
					            setThreadName("Bot heartbeat");
 | 
				
			||||||
            std::string state("na");
 | 
					            std::string state("na");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (!enableHeartbeat) return;
 | 
					            if (!enableHeartbeat) return;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user