Closed amab8901 closed 4 months ago
Is your feature request related to a problem? Please describe. Frustration lies in the verbosity (and hard-to-readness) of having to write:
let state_of_devices = Arc::new(Mutex::new(STATE_OF_DEVICES.clone()));
Describe the solution you'd like Convenience macro:
let state_of_devices = arcmutex!(STATE_OF_DEVICES.clone());
Describe alternatives you've considered
Additional context I think it would make sense to use a convenience macro for Arc<Mutex<T>> because it's a common pattern.
Arc<Mutex<T>>
You can define it yourself. It will not be added to Tokio.
Is your feature request related to a problem? Please describe. Frustration lies in the verbosity (and hard-to-readness) of having to write:
Describe the solution you'd like Convenience macro:
Describe alternatives you've considered
Additional context I think it would make sense to use a convenience macro for
Arc<Mutex<T>>
because it's a common pattern.