qbtrade/pkg/util/trylock_18.go

15 lines
198 B
Go
Raw Normal View History

2024-06-27 14:42:38 +00:00
//go:build go1.18
// +build go1.18
package util
import "sync"
func TryLock(lock *sync.RWMutex) bool {
return lock.TryLock()
}
func TryRLock(lock *sync.RWMutex) bool {
return lock.TryRLock()
}