mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user