logoalt Hacker News

quotemstrtoday at 1:28 AM1 replyview on HN

One advantage to using pthread is the ability to call pthread_setname_np to name threads and thereby make debugging easier. Granted, you can call it with std::thread by using std::thread::native_handle() to get the pthread handle, but you're still using a non-std::thread API.


Replies

grg0today at 1:30 AM

I see, I wasn't aware of that one. Typically I'd assign an ID, but yeah, names make things easier.