This commit is contained in:
Liang Ding 2023-01-27 16:48:42 +08:00
parent 258acc1142
commit a3940c220f
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
5 changed files with 25 additions and 30 deletions

View file

@ -61,8 +61,6 @@ func IsUnfoldHeading(transactions *[]*Transaction) bool {
return false
}
const txFixDelay = 10
var (
txQueue []*Transaction
txQueueLock = sync.Mutex{}
@ -87,7 +85,7 @@ func WaitForWritingFiles() {
}
func isWritingFiles() bool {
time.Sleep(time.Duration(txFixDelay+10) * time.Millisecond)
time.Sleep(time.Duration(20) * time.Millisecond)
if 0 < len(txQueue) || util.IsMutexLocked(&txQueueLock) {
return true
}