Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jaykrell
Copy link
Contributor

@jaykrell jaykrell commented Sep 3, 2019

When the generation-based solution went in, there were not
yet constant thread names, so a pointer based approach could fail
due to reuse. We can do slightly simpler now.

@marek-safar
Copy link
Member

@vargaz could you please review that

@jaykrell
Copy link
Contributor Author

@monojenkins build OS X x64 Hardened Runtime

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we could. It is a reasonable idea, but yes, removable.
It predates the ability to just do the pointer compare.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be clear, w/o this PR, it is used. This PR replaces the use.

Copy link
Contributor

Choose a reason for hiding this comment

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

IMHO it should be removed if it's unused. We can always bring it back from history if necessary. Otherwise the change LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd be resolving merge conflicts in configure.ac every few days for months, had I made that change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I’ll remove it today. Hopefully without having it sit months longer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given this duplicates knowledge from set_constant, merits a comment or a helper macro/function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a funny named flag to centralize the knowledge.

@jaykrell
Copy link
Contributor Author

jaykrell commented Nov 5, 2019

@monojenkins build monolite

@jaykrell
Copy link
Contributor Author

jaykrell commented Nov 5, 2019

@monojenkins build failed

1 similar comment
@jaykrell
Copy link
Contributor Author

jaykrell commented Nov 5, 2019

@monojenkins build failed

@jaykrell
Copy link
Contributor Author

jaykrell commented Nov 5, 2019

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 16637 in repo mono/mono

@filipnavara
Copy link
Contributor

Azure Pipelines bot triggering is broken, it was already reported upstream by the dotnet people.

When the generation-based solution went in, there were not
yet constant thread names, so a pointer based approach could fail
due to reuse. We can do slightly simpler now.
Remove the duplicated knowledge of how to set a constant and put
it behind a funny sounding but perhaps reasonable flag.
Revise corlib version.
@jaykrell
Copy link
Contributor Author

@monojenkins build monolite

@akoeplinger
Copy link
Member

@jaykrell can you please rebase this PR to master?

@lambdageek
Copy link
Member

@monojenkins build deb with monolite

@lambdageek
Copy link
Member

@monojenkins build

MonoSetThreadNameFlag_Permanent = 0x0001,
MonoSetThreadNameFlag_Reset = 0x0002,
MonoSetThreadNameFlag_Constant = 0x0004,
MonoSetThreadNameFlag_RepeatedlyButOptimized = 0x0008,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't like this name.
Some might shorten it to "Fast" (the "optimized" part, omitting the "repeatedly" part).
I don't like that either, popular but vague.
I couldn't come up with anything else.
It could also be, instead of the behavior, the user -- "ThreadPoolWorker".
But I just pushed past the analysis/naming paralysis. :)

@lambdageek lambdageek merged commit 2129ac6 into mono:master Jan 7, 2020
ManickaP pushed a commit to ManickaP/runtime that referenced this pull request Jan 20, 2020
…/mono#16637)

* Set thread pool thread name just based on string pointer check.

When the generation-based solution went in, there were not
yet constant thread names, so a pointer based approach could fail
due to reuse. We can do slightly simpler now.

* Remove the generation field which is no longer needed.
Remove the duplicated knowledge of how to set a constant and put
it behind a funny sounding but perhaps reasonable flag.
Revise corlib version.


Commit migrated from mono/mono@2129ac6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants