1
0
Fork 0
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:
Roman Khafizianov 2022-12-02 13:37:54 +01:00
parent bf0d806f66
commit bccacebb93
No known key found for this signature in database
GPG key ID: F07A7D55A2684852
8 changed files with 71 additions and 31 deletions

11
util/mutex/locker.go Normal file
View 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
View file

@ -0,0 +1,11 @@
//go:build nomutexdeadlockdetector
package mutex
import (
"sync"
)
func NewLocker() *sync.Mutex {
return &sync.Mutex{}
}