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