Avoid using multiple threads

Seems to cause issues if there are multiple threads and each one of them
is loading the same new file, in which case there is a race condition.
This commit is contained in:
Joe Lim committed 2024-04-04 17:16:45 +11:00
1 parent ced735a187
commit 76aacc708b
2 files changed
+85 -33

No files matched your search

-2
View File
@@ -443,7 +443,6 @@ type nav struct {
dirPreviewChan chan *dir
dirChan chan *dir
regChan chan *reg
fileChan chan *file
dirCache map[string]*dir
regCache map[string]*reg
saves map[string]bool
@@ -594,7 +593,6 @@ func newNav(height int) *nav {
dirPreviewChan: make(chan *dir, 1024),
dirChan: make(chan *dir),
regChan: make(chan *reg),
fileChan: make(chan *file),
dirCache: make(map[string]*dir),
regCache: make(map[string]*reg),
saves: make(map[string]bool),