diff options
author | 2022-03-08 11:56:53 +0000 | |
---|---|---|
committer | 2022-03-08 12:56:53 +0100 | |
commit | b8879ac68a30e8bccd1c96cc4630da791d8996c4 (patch) | |
tree | 77adeeaf2456610b771d9df8dc38207014215aea /vendor/codeberg.org/gruf/go-mutexes/debug.go | |
parent | [performance] Database optimizations (#419) (diff) | |
download | gotosocial-b8879ac68a30e8bccd1c96cc4630da791d8996c4.tar.xz |
[dependencies] update go-store, go-mutexes (#422)
* update go-store, go-mutexes
Signed-off-by: kim <grufwub@gmail.com>
* update vendored code
Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/codeberg.org/gruf/go-mutexes/debug.go')
-rw-r--r-- | vendor/codeberg.org/gruf/go-mutexes/debug.go | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/vendor/codeberg.org/gruf/go-mutexes/debug.go b/vendor/codeberg.org/gruf/go-mutexes/debug.go new file mode 100644 index 000000000..1b7be60c7 --- /dev/null +++ b/vendor/codeberg.org/gruf/go-mutexes/debug.go @@ -0,0 +1,39 @@ +package mutexes + +// func init() { +// log.SetFlags(log.Flags() | log.Lshortfile) +// } + +// type debugMutex sync.Mutex + +// func (mu *debugMutex) Lock() { +// log.Output(2, "Lock()") +// (*sync.Mutex)(mu).Lock() +// } + +// func (mu *debugMutex) Unlock() { +// log.Output(2, "Unlock()") +// (*sync.Mutex)(mu).Unlock() +// } + +// type debugRWMutex sync.RWMutex + +// func (mu *debugRWMutex) Lock() { +// log.Output(2, "Lock()") +// (*sync.RWMutex)(mu).Lock() +// } + +// func (mu *debugRWMutex) Unlock() { +// log.Output(2, "Unlock()") +// (*sync.RWMutex)(mu).Unlock() +// } + +// func (mu *debugRWMutex) RLock() { +// log.Output(2, "RLock()") +// (*sync.RWMutex)(mu).RLock() +// } + +// func (mu *debugRWMutex) RUnlock() { +// log.Output(2, "RUnlock()") +// (*sync.RWMutex)(mu).RUnlock() +// } |