mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
locker
This commit is contained in:
13
locker/rw_locker.go
Normal file
13
locker/rw_locker.go
Normal file
@ -0,0 +1,13 @@
|
||||
package locker
|
||||
|
||||
import "sync"
|
||||
|
||||
var _ RWLocker = &rwLocker{}
|
||||
|
||||
type rwLocker struct {
|
||||
*sync.RWMutex
|
||||
}
|
||||
|
||||
func NewRWLocker() *rwLocker {
|
||||
return &rwLocker{RWMutex: &sync.RWMutex{}}
|
||||
}
|
Reference in New Issue
Block a user