shm: reduce delay between monitor daemon launch & HBs

This commit is contained in:
Alexey Rybalchenko 2021-03-31 12:58:17 +02:00
parent 9144258b89
commit 0976465338

View File

@ -105,6 +105,8 @@ class Manager
StartMonitor(fShmId); StartMonitor(fShmId);
} }
fHeartbeatThread = std::thread(&Manager::SendHeartbeats, this);
{ {
std::stringstream ss; std::stringstream ss;
boost::interprocess::scoped_lock<boost::interprocess::named_mutex> lock(fShmMtx); boost::interprocess::scoped_lock<boost::interprocess::named_mutex> lock(fShmMtx);
@ -200,8 +202,6 @@ class Manager
fShmMsgCounters = fManagementSegment.find_or_construct<Uint16MsgCounterHashMap>(unique_instance)(fShmVoidAlloc); fShmMsgCounters = fManagementSegment.find_or_construct<Uint16MsgCounterHashMap>(unique_instance)(fShmVoidAlloc);
#endif #endif
} }
fHeartbeatThread = std::thread(&Manager::SendHeartbeats, this);
} }
Manager() = delete; Manager() = delete;