ethereum / ssv

The repository has moved to https://github.com/bloxapp/ssv
https://github.com/bloxapp/ssv
24 stars 12 forks source link

Using RWMutex instead of Mutex #73

Closed amirylm closed 3 years ago

amirylm commented 3 years ago

Currently, in in-mem message container sync.Mutex is used while sync.RWMutex can be used to apply read lock on read operations.

Unlike regular lock, RLock allows multiple readers to acquire it.