diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-08-07 09:44:50 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-08-07 11:16:14 +1000 |
commit | 755ae0ef846d6a42678d0b8cb2c37108f79a0458 (patch) | |
tree | 8ef20b395f85fa174c122665ca46eb2d7d9b7ff4 /pkg/gui/gui.go | |
parent | 7410acd1aaa97f678295a328264360802346b33a (diff) |
add deadlock mutex package
write to deadlock stderr after closing gocui
more deadlock checking
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 6b5f129af..bb5821a57 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -35,6 +35,7 @@ import ( "github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/updates" "github.com/jesseduffield/lazygit/pkg/utils" + "github.com/sasha-s/go-deadlock" "gopkg.in/ozeidan/fuzzy-patricia.v3/patricia" ) @@ -358,13 +359,13 @@ func NewGui( // sake of backwards compatibility. We're making use of short circuiting here ShowExtrasWindow: cmn.UserConfig.Gui.ShowCommandLog && !config.GetAppState().HideCommandLog, Mutexes: types.Mutexes{ - RefreshingFilesMutex: &sync.Mutex{}, - RefreshingStatusMutex: &sync.Mutex{}, - SyncMutex: &sync.Mutex{}, - LocalCommitsMutex: &sync.Mutex{}, - SubprocessMutex: &sync.Mutex{}, - PopupMutex: &sync.Mutex{}, - PtyMutex: &sync.Mutex{}, + RefreshingFilesMutex: &deadlock.Mutex{}, + RefreshingStatusMutex: &deadlock.Mutex{}, + SyncMutex: &deadlock.Mutex{}, + LocalCommitsMutex: &deadlock.Mutex{}, + SubprocessMutex: &deadlock.Mutex{}, + PopupMutex: &deadlock.Mutex{}, + PtyMutex: &deadlock.Mutex{}, }, InitialDir: initialDir, } |