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

This commit is contained in:
Sam Kleinman
2021-04-03 14:25:15 -04:00
committed by GitHub
parent 46e06c9732
commit 1c4dbe30d4
8 changed files with 31 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,
}
}