mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 20:17:42 +00:00
callback cannot be nil (#17718)
`Task.callback` cannot be nil, we need to raise it at debug and release mode Situations: - if users create a Task object without using `toTask` and invoke the Task - if users already move the Task and invoke the Task
This commit is contained in:
@@ -75,6 +75,7 @@ proc `=destroy`*(t: var Task) {.inline.} =
|
||||
|
||||
proc invoke*(task: Task) {.inline.} =
|
||||
## Invokes the `task`.
|
||||
assert task.callback != nil
|
||||
task.callback(task.args)
|
||||
|
||||
template checkIsolate(scratchAssignList: seq[NimNode], procParam, scratchDotExpr: NimNode) =
|
||||
|
||||
Reference in New Issue
Block a user