3 ms·
We have a middleware for that! You can look at http://github.com/iron/persistent http://github.com/iron/persistent, which does wrap an RWLock in an Arc. It also
by zzmp 12y ago
We have a middleware for that! You can look at http://github.com/iron/persistent http://github.com/iron/persistent, which does wrap an RWLock in an Arc. It also provides a struct to make your middleware Share, so you can do similar things.
We also have session, which works on a HashMap under an Arc, although it isolates the mutable data to a session, instead of sharing it across isolated requests.