@@ -35,26 +35,26 @@ ZeDMDComm::ZeDMDComm()
3535
3636ZeDMDComm::~ZeDMDComm ()
3737{
38- Log (" ZeDMDComm destructor start: connected=%d queue_empty=%d delayed=%d" , ( int ) IsConnected () , (int ) IsQueueEmpty () ,
39- (int )m_delayedFrameReady);
38+ Log (" ZeDMDComm[%s@%p] destructor start: connected=%d queue_empty=%d delayed=%d" , m_instanceName , (void *) this ,
39+ (int )IsConnected (), ( int ) IsQueueEmpty (), ( int ) m_delayedFrameReady);
4040
4141 m_stopFlag.store (true , std::memory_order_release);
4242 Disconnect ();
4343
4444 if (m_pThread)
4545 {
46- Log (" ZeDMDComm destructor: joining run thread" );
46+ Log (" ZeDMDComm[%s@%p] destructor: joining run thread" , m_instanceName, ( void *) this );
4747 if (m_pThread->joinable ())
4848 {
4949 m_pThread->join ();
5050 }
51- Log (" ZeDMDComm destructor: joined run thread" );
51+ Log (" ZeDMDComm[%s@%p] destructor: joined run thread" , m_instanceName, ( void *) this );
5252
5353 delete m_pThread;
5454 m_pThread = nullptr ;
5555 }
5656
57- Log (" ZeDMDComm destructor finished" );
57+ Log (" ZeDMDComm[%s@%p] destructor finished" , m_instanceName, ( void *) this );
5858}
5959
6060void ZeDMDComm::SetLogCallback (ZeDMD_LogCallback callback, const void * userData)
@@ -84,7 +84,7 @@ void ZeDMDComm::Run()
8484 m_pThread = new std::thread (
8585 [this ]()
8686 {
87- Log (" ZeDMDComm run thread starting" );
87+ Log (" ZeDMDComm[%s@%p] run thread starting" , m_instanceName, ( void *) this );
8888 m_stopFlag.load (std::memory_order_acquire);
8989
9090 try
@@ -135,15 +135,15 @@ void ZeDMDComm::Run()
135135 }
136136 }
137137
138- Log (" ZeDMDComm run thread loop exited: connected=%d stop=%d" , ( int ) IsConnected () ,
139- (int )m_stopFlag.load (std::memory_order_relaxed));
138+ Log (" ZeDMDComm[%s@%p] run thread loop exited: connected=%d stop=%d" , m_instanceName, ( void *) this ,
139+ (int )IsConnected (), ( int ) m_stopFlag.load (std::memory_order_relaxed));
140140 }
141141 catch (...)
142142 {
143- Log (" ZeDMDComm run thread caught unexpected exception" );
143+ Log (" ZeDMDComm[%s@%p] run thread caught unexpected exception" , m_instanceName, ( void *) this );
144144 }
145145
146- Log (" ZeDMDComm run thread finished" );
146+ Log (" ZeDMDComm[%s@%p] run thread finished" , m_instanceName, ( void *) this );
147147 });
148148}
149149
0 commit comments