mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 21:58:37 -05:00
BLOCKING_QUEUE: display current Thread id in both hex and decimal so both worlds are happy (GDB and Visual Studio)
This commit is contained in:
parent
25f7ba386d
commit
7d412eccb6
@ -90,8 +90,9 @@ public:
|
||||
}
|
||||
else if (false == m_cond_not_full.wait_for(lock, std::chrono::microseconds(timeout),
|
||||
[this]() { return m_queue.size() < m_max_num_items; })) {
|
||||
std::cout << "WARNING: Thread 0x" << std::hex << std::this_thread::get_id() << std::dec <<
|
||||
" executing {" << typeid(*this).name() << "}.push() has failed with timeout > " <<
|
||||
std::thread::id currentThreadId = std::this_thread::get_id();
|
||||
std::cout << "WARNING: Thread 0x" << std::hex << currentThreadId << std::dec <<
|
||||
" (" << currentThreadId << ") executing {" << typeid(*this).name() << "}.push() has failed with timeout > " <<
|
||||
(timeout * 0.001) << " ms, message: " << errorMessage << std::endl;
|
||||
return false;
|
||||
}
|
||||
@ -138,9 +139,10 @@ public:
|
||||
}
|
||||
else if (false == m_cond_not_empty.wait_for(lock, std::chrono::microseconds(timeout),
|
||||
[this]() { return !m_queue.empty(); })) {
|
||||
std::cout << "WARNING: Thread 0x" << std::hex << std::this_thread::get_id() << std::dec <<
|
||||
" executing {" << typeid(*this).name() << "}.pop() has failed with timeout > " <<
|
||||
(timeout * 0.001) << " ms, message: " << errorMessage << std::endl;
|
||||
std::thread::id currentThreadId = std::this_thread::get_id();
|
||||
std::cout << "WARNING: Thread 0x" << std::hex << currentThreadId << std::dec <<
|
||||
" (" << currentThreadId << ") executing {" << typeid(*this).name() << "}.pop() has failed with timeout > " <<
|
||||
(timeout * 0.001) << " ms, message: " << errorMessage << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user