ensure task destructor is run
This commit is contained in:
parent
176656044b
commit
e1fa0ec097
|
@ -193,6 +193,7 @@ proc new(T: type TaskNode, parent: TaskNode, task: sink Task): T =
|
|||
proc runTask(tn: var TaskNode) {.raises:[Exception], inline.} =
|
||||
## Run a task and consumes the taskNode
|
||||
tn.task.invoke()
|
||||
tn.task.`=destroy`()
|
||||
tn.c_free()
|
||||
|
||||
proc schedule(ctx: WorkerContext, tn: sink TaskNode) {.inline.} =
|
||||
|
|
Loading…
Reference in New Issue