mirror of
https://github.com/anyproto/anytype-heart.git
synced 2025-06-10 18:10:49 +09:00
fix relationOption create, add sb.Lock deadlock detection (except prod)
This commit is contained in:
parent
bf0d806f66
commit
bccacebb93
8 changed files with 71 additions and 31 deletions
11
util/mutex/locker.go
Normal file
11
util/mutex/locker.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
//go:build !nomutexdeadlockdetector
|
||||
|
||||
package mutex
|
||||
|
||||
import (
|
||||
"github.com/sasha-s/go-deadlock"
|
||||
)
|
||||
|
||||
func NewLocker() *deadlock.Mutex {
|
||||
return &deadlock.Mutex{}
|
||||
}
|
11
util/mutex/locker_prod.go
Normal file
11
util/mutex/locker_prod.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
//go:build nomutexdeadlockdetector
|
||||
|
||||
package mutex
|
||||
|
||||
import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
func NewLocker() *sync.Mutex {
|
||||
return &sync.Mutex{}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue