"io"
"os"
"path/filepath"
+ "sync/atomic"
"time"
"github.com/zyedidia/micro/v2/internal/config"
for len(backupRequestChan) > 0 {
b := <-backupRequestChan
- b.Backup()
+ bfini := atomic.LoadInt32(&(b.fini)) != 0
+ if !bfini {
+ b.Backup()
+ }
}
}
}
"strconv"
"strings"
"sync"
+ "sync/atomic"
"time"
luar "layeh.com/gopher-luar"
*EventHandler
*SharedBuffer
+ fini int32
cursors []*Cursor
curCursor int
StartCursor Loc
if b.Type == BTStdout {
fmt.Fprint(util.Stdout, string(b.Bytes()))
}
+
+ atomic.StoreInt32(&(b.fini), int32(1))
}
// GetName returns the name that should be displayed in the statusline