async all() now immediately completes if arg is empty
This commit is contained in:
parent
5842f7d0d2
commit
f2bded180f
2 changed files with 16 additions and 0 deletions
|
|
@ -66,3 +66,12 @@ block:
|
|||
|
||||
doAssert execTime * 100 < taskCount * sleepDuration
|
||||
doAssert results == expected
|
||||
|
||||
block:
|
||||
let
|
||||
noIntFuturesFut = all(newSeq[Future[int]]())
|
||||
noVoidFuturesFut = all(newSeq[Future[void]]())
|
||||
|
||||
doAssert noIntFuturesFut.finished and not noIntFuturesFut.failed
|
||||
doAssert noVoidFuturesFut.finished and not noVoidFuturesFut.failed
|
||||
doAssert noIntFuturesFut.read() == @[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue