Replace Mutex with RWMutex

This commit is contained in:
Carlos Quintana 2021-10-19 08:09:59 +02:00
parent 9f25490f61
commit c406b182bb
No known key found for this signature in database
GPG key ID: 68324E212E167F8E
2 changed files with 6 additions and 6 deletions

View file

@ -8,13 +8,13 @@ import "sync"
type GopenPGP struct {
latestServerTime int64
generationOffset int64
lock *sync.Mutex
lock *sync.RWMutex
}
var pgp = GopenPGP{
latestServerTime: 0,
generationOffset: 0,
lock: &sync.Mutex{},
lock: &sync.RWMutex{},
}
// clone returns a clone of the byte slice. Internal function used to make sure