Add waitFor on seq[Future], waitAll and more (#5189)

* Switch to unittest and speedup

* Make timers and callbacks fields public
This commit is contained in:
Federico Ceratto 2017-05-16 14:36:21 +01:00 • committed by Dominik Picheta
commit fcd86883ed
2 changed files with 34 additions and 33 deletions

View file

@ -163,8 +163,8 @@ include includes/asyncfutures
type
PDispatcherBase = ref object of RootRef
timers: HeapQueue[tuple[finishAt: float, fut: Future[void]]]
callbacks: Deque[proc ()]
timers*: HeapQueue[tuple[finishAt: float, fut: Future[void]]]
callbacks*: Deque[proc ()]
proc processTimers(p: PDispatcherBase) {.inline.} =
#Process just part if timers at a step