Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix thread name generate strategy. #5139

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

horizonzy
Copy link
Collaborator

What is the purpose of the change

String threadName = name + id.getAndDecrement(); -> String threadName = name + id.getAndIncrement();

@KomachiSion
Copy link
Collaborator

I think the old author want use the negative as the split between name and id number.

@KomachiSion KomachiSion added the status/invalid This doesn't seem right label Mar 19, 2021
@horizonzy
Copy link
Collaborator Author

I think the old author want use the negative as the split between name and id number.

hhh...

@horizonzy horizonzy closed this Mar 19, 2021
@horizonzy horizonzy reopened this Mar 21, 2021
@horizonzy
Copy link
Collaborator Author

I think the old author want use the negative as the split between name and id number.

public NameThreadFactory(String name) {
if (!name.endsWith(StringUtils.DOT)) {
name += StringUtils.DOT;
}
this.name = name;
}

Maybe not, the split is DOT.

@horizonzy horizonzy removed the status/invalid This doesn't seem right label Mar 22, 2021
@KomachiSion
Copy link
Collaborator

all right

@KomachiSion KomachiSion merged commit cb289d3 into alibaba:develop Mar 23, 2021
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.

2 participants