fix: task id not update

pull/1604/head
Noah Hsu 2022-08-31 22:53:41 +08:00
parent 755f4b83f6
commit 454f563bce
1 changed files with 1 additions and 1 deletions

View File

@ -16,8 +16,8 @@ type Manager[K comparable] struct {
func (tm *Manager[K]) Submit(task *Task[K]) K {
if tm.updateID != nil {
tm.updateID(&tm.curID)
task.ID = tm.curID
tm.updateID(&task.ID)
}
tm.tasks.Store(task.ID, task)
tm.do(task)