What's the normal way of dealing with "global" state in a Rust program using tokio? Or, to ask a more specific question expressing what I think I want: is there a way to teach the borrow checker that an object has a lifetime longer than the tokio event loop? /cc @ManishEarth

Mar 27, 2018 · 4:40 PM UTC

2
1
See my reply to Manish... it's not quite global.
Replying to @davidbaron
You could make a "proper" global using thread local state or lazy_static
1