Add assert on callSoon(nil)
This commit is contained in:
parent
14dd1e9a8e
commit
163982bc6e
|
@ -745,6 +745,7 @@ include asyncmacro2
|
||||||
proc callSoon(cbproc: CallbackFunc, data: pointer = nil) =
|
proc callSoon(cbproc: CallbackFunc, data: pointer = nil) =
|
||||||
## Schedule `cbproc` to be called as soon as possible.
|
## Schedule `cbproc` to be called as soon as possible.
|
||||||
## The callback is called when control returns to the event loop.
|
## The callback is called when control returns to the event loop.
|
||||||
|
assert cbproc != nil
|
||||||
let acb = AsyncCallback(function: cbproc, udata: data)
|
let acb = AsyncCallback(function: cbproc, udata: data)
|
||||||
getGlobalDispatcher().callbacks.addLast(acb)
|
getGlobalDispatcher().callbacks.addLast(acb)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue