File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 11packageName = " asyncdispatch2"
2- version = " 2.0.6 "
2+ version = " 2.0.7 "
33author = " Status Research & Development GmbH"
44description = " Asyncdispatch2"
55license = " Apache License 2.0 or MIT"
Original file line number Diff line number Diff line change @@ -227,6 +227,12 @@ template processTimers(loop: untyped) =
227227template processCallbacks (loop: untyped ) =
228228 var count = len (loop.callbacks)
229229 for i in 0 ..< count:
230+ # This is mostly workaround for people which are using `waitFor` where
231+ # it must be used `await`. While using `waitFor` inside of callbacks
232+ # dispatcher's callback list is got decreased and length of
233+ # `loop.callbacks` become not equal to `count`, its why `IndexError`
234+ # can be generated.
235+ if len (loop.callbacks) == 0 : break
230236 let callable = loop.callbacks.popFirst ()
231237 callable.function (callable.udata)
232238
You can’t perform that action at this time.
0 commit comments