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:
@ -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{},
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user