mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
add deadlock mutex package
write to deadlock stderr after closing gocui more deadlock checking
This commit is contained in:
@ -11,6 +11,7 @@ import (
|
||||
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
"github.com/sasha-s/go-deadlock"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@ -34,8 +35,8 @@ type ViewBufferManager struct {
|
||||
// this is what we write the output of the task to. It's typically a view
|
||||
writer io.Writer
|
||||
|
||||
waitingMutex sync.Mutex
|
||||
taskIDMutex sync.Mutex
|
||||
waitingMutex deadlock.Mutex
|
||||
taskIDMutex deadlock.Mutex
|
||||
Log *logrus.Entry
|
||||
newTaskID int
|
||||
readLines chan int
|
||||
@ -126,7 +127,7 @@ func (self *ViewBufferManager) NewCmdTask(start func() (*exec.Cmd, io.Reader), p
|
||||
}
|
||||
})
|
||||
|
||||
loadingMutex := sync.Mutex{}
|
||||
loadingMutex := deadlock.Mutex{}
|
||||
|
||||
// not sure if it's the right move to redefine this or not
|
||||
self.readLines = make(chan int, 1024)
|
||||
|
Reference in New Issue
Block a user