tread id report

main
Tom Early 4 years ago
parent b724a5d59c
commit df1fb39f36

@ -174,7 +174,7 @@ bool CController::InitDevices()
// based on packet's codec_in. // based on packet's codec_in.
void CController::ReadReflectorThread() void CController::ReadReflectorThread()
{ {
pthread_setname_np(gettid(), "ReadReflector"); std::cout << "ReadReflector tid=" << gettid() << " get_id=" << std::this_thread::get_id() << std::endl;
while (keep_running) while (keep_running)
{ {
STCPacket tcpack; STCPacket tcpack;
@ -290,7 +290,7 @@ void CController::Codec2toAudio(std::shared_ptr<CTranscoderPacket> packet)
void CController::ProcessC2Thread() void CController::ProcessC2Thread()
{ {
pthread_setname_np(gettid(), "ProcessC2"); std::cout << "ProcessC2 tid=" << gettid() << " get_id=" << std::this_thread::get_id() << std::endl;
while (keep_running) while (keep_running)
{ {
auto packet = codec2_queue.pop(); auto packet = codec2_queue.pop();

@ -512,7 +512,7 @@ bool CDV3003::GetResponse(SDV3003_Packet &packet)
void CDV3003::FeedDevice() void CDV3003::FeedDevice()
{ {
pthread_setname_np(gettid(), "FeedDevice"); std::cout << "FeedDevice tid=" << gettid() << " get_id=" << std::this_thread::get_id() << std::endl;
const std::string modules(TRANSCODED_MODULES); const std::string modules(TRANSCODED_MODULES);
const auto n = modules.size(); const auto n = modules.size();
while (keep_running) while (keep_running)
@ -558,7 +558,7 @@ void CDV3003::FeedDevice()
void CDV3003::ReadDevice() void CDV3003::ReadDevice()
{ {
pthread_setname_np(gettid(), "ReadDevice"); std::cout << "ReadDevice tid=" << gettid() << " get_id=" << std::this_thread::get_id() << std::endl;
while (keep_running) while (keep_running)
{ {
dv3003_packet p; dv3003_packet p;

Loading…
Cancel
Save

Powered by TurnKey Linux.