SergioBenitez / state

A Rust library for safe and effortless global and thread-local state management.
Other
213 stars 14 forks source link

Thread-local Container #7

Closed SOF3 closed 3 years ago

SOF3 commented 5 years ago

Objects are required to be Send + Sync because the container is expected to be used from multiple threads. To have mutability, it is necessary to wrap everything with Mutex. Having a single-threaded variant would simplify this process.

SergioBenitez commented 5 years ago

LocalContainer allows values to be Send only. Does that suffice?