(cobra bots) set thread name for utility threads

This commit is contained in:
Benjamin Sergeant 2020-06-04 09:52:35 -07:00
parent 1c6ff733f9
commit abd6581242

View File

@ -8,6 +8,7 @@
#include <ixcobra/IXCobraConnection.h>
#include <ixcore/utils/IXCoreLogger.h>
#include <ixwebsocket/IXSetThreadName.h>
#include <algorithm>
#include <chrono>
@ -54,6 +55,7 @@ namespace ix
&receivedCountPerMinutes,
&minuteCounter,
&stop] {
setThreadName("Bot progress");
while (!stop)
{
//
@ -94,6 +96,7 @@ namespace ix
std::thread t1(timer);
auto heartbeat = [&sentCount, &receivedCount, &stop, &enableHeartbeat, &heartBeatTimeout, &fatalCobraError] {
setThreadName("Bot heartbeat");
std::string state("na");
if (!enableHeartbeat) return;