mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Clean code
This commit is contained in:
parent
faa5f4decd
commit
6a3c280639
1 changed files with 1 additions and 6 deletions
|
|
@ -36,7 +36,6 @@ var (
|
||||||
operationQueue []*dbQueueOperation
|
operationQueue []*dbQueueOperation
|
||||||
dbQueueLock = sync.Mutex{}
|
dbQueueLock = sync.Mutex{}
|
||||||
txLock = sync.Mutex{}
|
txLock = sync.Mutex{}
|
||||||
isWriting = false
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type dbQueueOperation struct {
|
type dbQueueOperation struct {
|
||||||
|
|
@ -72,11 +71,7 @@ func FlushQueue() {
|
||||||
}
|
}
|
||||||
|
|
||||||
txLock.Lock()
|
txLock.Lock()
|
||||||
isWriting = true
|
defer txLock.Unlock()
|
||||||
defer func() {
|
|
||||||
isWriting = false
|
|
||||||
txLock.Unlock()
|
|
||||||
}()
|
|
||||||
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue