mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-23 23:35:14 +00:00
15 lines
198 B
Go
15 lines
198 B
Go
//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()
|
|
}
|