I'm using Sled which supports concurrent method calls for reading/writing. I'm not sure how lazy_static! works (took a read of the source code, couldn't figure it out), but, I'm wondering if lazy_static! will prevent concurrent method calls to the same variable.
From looking through the source, I don't see any Mutex or RwLock so my assumption is yes, but just want to make sure.
It has the same semantic as static: You get only &T access to a type T that is also required to implement Sync. So for most types this means you can just concurrently read from them.
I'm using Sled which supports concurrent method calls for reading/writing. I'm not sure how
lazy_static!
works (took a read of the source code, couldn't figure it out), but, I'm wondering iflazy_static!
will prevent concurrent method calls to the same variable.From looking through the source, I don't see any
Mutex
orRwLock
so my assumption is yes, but just want to make sure.