Revert "[skip ci][perf] do not listen on tasks that have no callbacks" (#647)
* Revert "[skip ci][perf] do not listen on tasks that have no callbacks"
This reverts commit 0bc5ab6117.
* changelog
This commit is contained in:
1 parent
4906b69f4a
commit
fc2ffd8c23
2 files changed
+9
-5
No files matched your search
@@ -14,10 +14,9 @@ namespace AsyncTask
|
||||
task.id = id
|
||||
task.input = input
|
||||
|
||||
if callback <> invalid
|
||||
m[`asynctask_${id}_callback`] = callback
|
||||
task.ObserveFieldScoped("state", FuncName(internal_OnTaskState))
|
||||
end if
|
||||
m[`asynctask_${id}`] = task
|
||||
m[`asynctask_${id}_callback`] = callback
|
||||
task.ObserveFieldScoped("state", FuncName(internal_OnTaskState))
|
||||
|
||||
return task
|
||||
end function
|
||||
@@ -40,6 +39,9 @@ namespace AsyncTask
|
||||
end if
|
||||
end if
|
||||
|
||||
task.input = invalid
|
||||
task.output = invalid
|
||||
m.delete(`asynctask_${id}`)
|
||||
m.delete(`asynctask_${id}_callback`)
|
||||
end function
|
||||
|
||||
|
||||
Reference in new issue
Block a user