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

Add factory method to create a NamedThreadLocal with an initial value #24705

Closed

Conversation

chenqimiao
Copy link
Contributor

@chenqimiao chenqimiao commented Mar 16, 2020

If we need a NamedThreadLocal with an initialization value, it will be very convenient to use the withInitial method of this PR, like this:

NamedThreadLocal.withInitial("SimpleThreadScope", HashMap::new);

It's just a suggestion. If you think it's okay, I hope it can be absorbed into this project.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Mar 16, 2020
@sbrannen sbrannen changed the title Add new static instantiation method with initial supplier in NameThreadLocal Introduce static factory method with initial supplier in NamedThreadLocal Mar 16, 2020
@sbrannen sbrannen added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement for: team-attention labels Mar 16, 2020
@snicoll snicoll self-assigned this Aug 23, 2023
@snicoll snicoll removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 23, 2023
@snicoll snicoll added this to the 6.1.0-RC1 milestone Aug 23, 2023
@snicoll snicoll changed the title Introduce static factory method with initial supplier in NamedThreadLocal Add factory method to create a NamedThreadLocal with an initial value Aug 23, 2023
@snicoll
Copy link
Member

snicoll commented Aug 23, 2023

Fixed by e1d0176 and polished in 5878a07. Thanks again @chenqimiao

@snicoll snicoll closed this Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants