Skip to content

Fix thread names in nano::thread_pool#4203

Merged
clemahieu merged 2 commits intonanocurrency:developfrom
pwojcikdev:fix-thread-pool-names
Apr 3, 2023
Merged

Fix thread names in nano::thread_pool#4203
clemahieu merged 2 commits intonanocurrency:developfrom
pwojcikdev:fix-thread-pool-names

Conversation

@pwojcikdev
Copy link
Copy Markdown
Contributor

@pwojcikdev pwojcikdev commented Apr 3, 2023

Thread names are very useful to quickly diagnose which threads are causing problems (eg. from htop). However, there were always a few threads whose name was missing, which was caused by buggy set_thread_names function. New version uses a counting latch to ensure each thread gets its name assigned, which requires bumping the target macOS version. Generally a thread pool can be implemented by using boost::io_context and a nano::thread_runner which would give us much better control of underlying threads and avoid some code duplication, but that is a TODO.

@pwojcikdev pwojcikdev force-pushed the fix-thread-pool-names branch from 9dde449 to a80b027 Compare April 3, 2023 15:04
@pwojcikdev pwojcikdev force-pushed the fix-thread-pool-names branch from a80b027 to af02fbe Compare April 3, 2023 15:06
@pwojcikdev pwojcikdev requested a review from clemahieu April 3, 2023 15:11
@clemahieu clemahieu merged commit 30bf99e into nanocurrency:develop Apr 3, 2023
@thsfs thsfs added the documentation This item indicates the need for or supplies updated or expanded documentation label May 22, 2023
@thsfs
Copy link
Copy Markdown
Contributor

thsfs commented May 22, 2023

Adding doc label as this bumps the required OSX version to 12.

@thsfs thsfs added routine This item indicates the need for or supplies a routine change non-functional change labels May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation This item indicates the need for or supplies updated or expanded documentation non-functional change routine This item indicates the need for or supplies a routine change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants