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 new SetTaskLocal layer / service #512

Closed
wants to merge 1 commit into from
Closed

Conversation

jplatte
Copy link
Collaborator

@jplatte jplatte commented Sep 5, 2024

Motivation

Allows easy state sharing via tokio::task_local!. Somewhat similar to AddExtensionLayer.

Solution

Add SetTaskLocalLayer and SetTaskLocal service.

@ikrivosheev
Copy link

@jplatte maybe can you move this layer to tower? I don't see specific things for http.

@jplatte
Copy link
Collaborator Author

jplatte commented Oct 31, 2024

You're right. Though I don't currently have the motivation to figure out the details of why my initial implementation didn't work out. Anyways, if that changes I'll make a PR to tower.

@jplatte jplatte closed this Oct 31, 2024
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