`Mutex<Option<TunnelManager>>`
is a lot more reasonable. :P
```
{
let mut tunnels1 = tunnels1.lock().await.unwrap();
tunnels1.open_tunnel(route_id).await?
}
```
Ain't it funky
@mauve Yeah the usual way to share data among threads is to wrap it in a `Arc<Mutex<T>>`. If you know that the access is read heavy, use an `RwLock` instead of the `Mutex`.
@mauve this is constantly how it makes me feel 😥
@dan_ballard I like the feeling tbh. It means that when I get stuff working I've learned some new skills or new ways of thinking I can apply for future problems.
I think the tool I'll use here is to structure what I want like coroutines and leverage channels for the inter-thread messaging.
Coding in rust makes me feel so stupid :P
It seems I need to place the mutex into an arc after all?