Re:Rust – How do I create a global, mutable singleton? (2015)
by Fiahil on Wednesday July 22, 2020 @10:51AM
(#23917648)
In most cases, additional plumbing is not even necessary, as it's often tied to a single object instantiated in the main function (database client, connection pool, config map, ...). The Arc<RwLock<T>> would go in that object.
[ Parent
| on HN ]
There are no comments on this comment yet.