mirror of
https://github.com/logos-storage/nim-chronos.git
synced 2026-02-05 22:23:34 +00:00
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) =
|
||||
## Schedule `cbproc` to be called as soon as possible.
|
||||
## The callback is called when control returns to the event loop.
|
||||
assert cbproc != nil
|
||||
let acb = AsyncCallback(function: cbproc, udata: data)
|
||||
getGlobalDispatcher().callbacks.addLast(acb)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user