Replace Mutex with RWMutex
This commit is contained in:
parent
9f25490f61
commit
c406b182bb
2 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue