abci: change client to use multi-reader mutexes (backport #6306) (#6873)

This commit is contained in:
mergify[bot]
2021-08-30 11:57:39 -04:00
committed by GitHub
parent 0c05841902
commit e0c6199aae
8 changed files with 37 additions and 29 deletions

View File

@@ -20,7 +20,7 @@ type ClientCreator interface {
// local proxy uses a mutex on an in-proc app
type localClientCreator struct {
mtx *tmsync.Mutex
mtx *tmsync.RWMutex
app types.Application
}
@@ -28,7 +28,7 @@ type localClientCreator struct {
// which will be running locally.
func NewLocalClientCreator(app types.Application) ClientCreator {
return &localClientCreator{
mtx: new(tmsync.Mutex),
mtx: new(tmsync.RWMutex),
app: app,
}
}