-
Couldn't load subscription status.
- Fork 25
feat: new version and tokio local key diags #187
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
Conversation
62a9695 to
c66b21e
Compare
| TASK_LOCAL_MAP.with(|map| { | ||
| let mut map = map.borrow_mut(); | ||
| for (key, value) in this.context.iter() { | ||
| map.push((key.clone(), value.clone())); | ||
| } | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may not be quite efficient. But generally kvs are small and we can anyway improve later.
| fn with_task_local_context( | ||
| self, | ||
| kvs: impl IntoIterator<Item = (String, String)>, | ||
| ) -> impl Future<Output = Self::Output> | ||
| where | ||
| Self: Sized, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer a shorter name, but not have a good idea now.
This closes #185.