mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 00:57:02 +00:00
🎨 Clean code https://github.com/siyuan-note/siyuan/pull/16881
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
@@ -183,7 +183,6 @@ func areArgsEqual(a, b interface{}) bool {
|
||||
return reflect.DeepEqual(a, b)
|
||||
}
|
||||
|
||||
|
||||
func getCurrentTasks() (ret []*Task) {
|
||||
queueLock.Lock()
|
||||
defer queueLock.Unlock()
|
||||
@@ -387,7 +386,6 @@ func popAsyncTasks() (ret []*Task) {
|
||||
|
||||
// 判断是否应该弹出此任务
|
||||
shouldPop := task.Async && time.Since(task.Created) > task.Delay
|
||||
|
||||
if shouldPop {
|
||||
ret = append(ret, task)
|
||||
// 不写入 taskQueue,相当于删除
|
||||
@@ -405,7 +403,6 @@ func popAsyncTasks() (ret []*Task) {
|
||||
taskQueue[i] = nil
|
||||
}
|
||||
taskQueue = taskQueue[:writeIdx]
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user