Skip to content

set thread name#3664

Merged
aleks-f merged 6 commits intopocoproject:develfrom
JackyWoo:set_thread_name
Jul 18, 2022
Merged

set thread name#3664
aleks-f merged 6 commits intopocoproject:develfrom
JackyWoo:set_thread_name

Conversation

@JackyWoo
Copy link
Copy Markdown
Contributor

@JackyWoo JackyWoo commented Jul 6, 2022

This pr try to close #3659

Change Log

  1. add setName and getOSThreadNameImpl(only for test) methods to ThreadImpls
  2. move name from Thread to ThreadImpl
  3. add global configuration POCO_MAX_THREAD_NAME_LEN

@JackyWoo
Copy link
Copy Markdown
Contributor Author

JackyWoo commented Jul 6, 2022

Pls do not review untill all tests pass, for I do not have a windows enviroment, the CI test may fail.

@aleks-f aleks-f added this to the Release 1.13.0 milestone Jul 6, 2022
@JackyWoo
Copy link
Copy Markdown
Contributor Author

@aleks-f pls review the pr. There are two CI checking errors, but myabe unrelated.

Copy link
Copy Markdown
Member

@aleks-f aleks-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. platforms where there is no native thread name implementation should have a "fake" name (this used to be in the front-end Thread class, but was removed in this pull); as this pull currently stands, there are implementations where it is not possible at all to set the thread name, not even a fake one
  2. style - opening curly braces are on the same line for namespace only, otherwise they go on the new line

@JackyWoo
Copy link
Copy Markdown
Contributor Author

  1. Every ThreadImpl has a name as thread name who maybe a fake one.
  2. Thanks. I wonder whether we shuould add a clang fromat file to project.

@JackyWoo
Copy link
Copy Markdown
Contributor Author

JackyWoo commented Jul 14, 2022

@aleks-f

poco-ci / windows-2019-msvc-cmake check failure, maybe unrelated.

There was 1 failure: 
 1: class CppUnit::TestCaller<class PollSetTest>.testPollClosedServer
    "fail: "
    in "<unknown>", line -1

@JackyWoo JackyWoo requested a review from aleks-f July 15, 2022 12:19
@aleks-f aleks-f merged commit 1d28d2d into pocoproject:devel Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants