proxy: Name threads spawned by the event loop - #324
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline and AI policy for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
| pthread_setname_np(name); | ||
| #else | ||
| // Prevent warnings for unused parameters... | ||
| (void)name; |
There was a problem hiding this comment.
In commit "proxy: Name threads spawned by the event loop" (61b6cd2)
Note for followup probably will want to extend this to windows.
There was a problem hiding this comment.
I agree, for Bitcoin Core it would be useful too.
There was a problem hiding this comment.
Opened for bitcoin core: bitcoin/bitcoin#35884
61b6cd2 to
67af015
Compare
|
Thanks for the review @ryanofsky! I forced push 67af015 so now it uses the macro HAVE_PTHREAD_GETTHREADID_NP instead. |
Threads spawned by makeThread(), makePool() and the async cleanup thread inherit the name of the thread that created them, so tooling and log lines can't distinguish them from it. This PR rename them at creation.
bitcoin-node
bitcoin-wallet
Since ThreadName() reads the name back with pthread_getname_np(), log lines pick this up too: