mirror of
https://github.com/status-im/nim-taskpools.git
synced 2025-01-28 23:25:19 +00:00
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…
x
Reference in New Issue
Block a user