[−][src]Macro tokio::task_local
Declares a new task-local key of type tokio::task::LocalKey
.
Syntax
The macro wraps any number of static declarations and makes them local to the current task. Publicity and attributes for each static is preserved. For example:
Examples
task_local! { pub static ONE: u32; #[allow(unused)] static TWO: f32; }
See LocalKey documentation for more information.