memery
memery copied to clipboard
Thread safety?
I was wondering if this is threadsafe. It seems https://github.com/yegor256/zache is and it mentions it in the README. Would be useful to know!
For thread-safety Zache has Mutex
inside. It sometimes slows work down, but provides locks.
However, Memery has no Mutex inside, so it's thread-unsafe, if you worry about this.
You should only memoize methods that always return same value for same set of arguments. If that is the case, you should not really worry about thread safety.