1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

add deadlock mutex package

write to deadlock stderr after closing gocui

more deadlock checking
This commit is contained in:
Jesse Duffield
2022-08-07 09:44:50 +10:00
parent 7410acd1aa
commit 755ae0ef84
44 changed files with 1635 additions and 57 deletions

View File

@ -1,9 +1,8 @@
package tasks
import (
"sync"
"github.com/jesseduffield/lazygit/pkg/utils"
"github.com/sasha-s/go-deadlock"
)
// the purpose of an AsyncHandler is to ensure that if we have multiple long-running
@ -17,13 +16,13 @@ import (
type AsyncHandler struct {
currentId int
lastId int
mutex sync.Mutex
mutex deadlock.Mutex
onReject func()
}
func NewAsyncHandler() *AsyncHandler {
return &AsyncHandler{
mutex: sync.Mutex{},
mutex: deadlock.Mutex{},
}
}