-
How to give a name to a task? For example, in async-std, task can be identified by task:: builder:: new(). name(), If there is no similar method, is there another method to identify a task? |
Beta Was this translation helpful? Give feedback.
Answered by
Darksonn
May 19, 2021
Replies: 1 comment
-
We don't have the ability to give a name to a task in Tokio itself, but you can attach all sorts of information to a task if you use the tracing library. You could also use a task local for storing information about a task. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Darksonn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We don't have the ability to give a name to a task in Tokio itself, but you can attach all sorts of information to a task if you use the tracing library. You could also use a task local for storing information about a task.