mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 12:58:48 +01:00
🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113
This commit is contained in:
parent
13e6ff8557
commit
f6d290bd61
1 changed files with 5 additions and 0 deletions
|
|
@ -519,6 +519,11 @@ func SaveBlockTree(force bool) {
|
|||
})
|
||||
|
||||
blockTrees.Range(func(key, value interface{}) bool {
|
||||
slice := value.(*btSlice)
|
||||
if !force && (slice.changed.IsZero() || slice.changed.After(start.Add(-7*time.Second))) {
|
||||
return true
|
||||
}
|
||||
|
||||
waitGroup.Add(1)
|
||||
p.Invoke(map[string]interface{}{"key": key, "value": value})
|
||||
return true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue