1// +build deadlock
2
3package vault
4
5import (
6	"github.com/sasha-s/go-deadlock"
7)
8
9// DeadlockMutex, when the build tag `deadlock` is present, behaves like a
10// sync.Mutex but does periodic checking to see if outstanding locks and requests
11// look like a deadlock.  If it finds a deadlock candidate it will output it
12// prefixed with "POTENTIAL DEADLOCK", as described at
13// https://github.com/sasha-s/go-deadlock
14type DeadlockMutex struct {
15	deadlock.Mutex
16}
17
18// DeadlockRWMutex is the RW version of DeadlockMutex.
19type DeadlockRWMutex struct {
20	deadlock.RWMutex
21}
22