Skip to content

Conversation

@tisonkun
Copy link
Contributor

@tisonkun tisonkun commented Oct 9, 2025

TRIVIAL AS IS. Align with with and try_with.

Signed-off-by: tison <wander4096@gmail.com>
@ADD-SP ADD-SP added A-tokio-util Area: The tokio-util crate C-feature-request Category: A feature request. M-task Module: tokio/task A-tokio Area: The main tokio crate and removed A-tokio-util Area: The tokio-util crate labels Oct 9, 2025
Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

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

Could you also add tests for this new feature?

Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

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

A follow-up question, what's the usecase of this feature?

@ADD-SP ADD-SP added S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. and removed S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. labels Oct 9, 2025
@tisonkun
Copy link
Contributor Author

tisonkun commented Oct 9, 2025

A follow-up question, what's the usecase of this feature?

This is answered in #7666 (comment).

Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

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

Could you add tests for this new method? I think tokio/tests/task_local.rs is a good place.

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Contributor Author

tisonkun commented Oct 9, 2025

Could you add tests for this new method? I think tokio/tests/task_local.rs is a good place.

Added at 5c7114e

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

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

Thanks.

@Darksonn Darksonn merged commit 0f9ae13 into tokio-rs:master Oct 9, 2025
88 checks passed
@tisonkun tisonkun deleted the local-key-try-get branch October 9, 2025 08:22
@ADD-SP ADD-SP removed the S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. label Oct 9, 2025
@Darksonn Darksonn mentioned this pull request Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-task Module: tokio/task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants