AsyncIter.new
This commit is contained in:
parent
bf84aa29ef
commit
09d49808cc
|
@ -120,7 +120,8 @@ proc getPendingBlocks(
|
|||
CatchableError,
|
||||
"Future for block id not found, tree cid: " & $manifest.treeCid & ", index: " & $index)
|
||||
|
||||
newAsyncIter[(?!bt.Block, int)](genNext, isFinished)
|
||||
# newAsyncIter[(?!bt.Block, int)](genNext, isFinished)
|
||||
asynciter.AsyncIter.new[(?!bt.Block, int)](genNext, isFinished)
|
||||
|
||||
proc prepareEncodingData(
|
||||
self: Erasure,
|
||||
|
|
|
@ -64,6 +64,12 @@ proc newAsyncIter*[T](genNext: GenNext[Future[T]], isFinished: IsFinished, finis
|
|||
iter.next = next
|
||||
return iter
|
||||
|
||||
proc new*[T](_: type AsyncIter, genNext: GenNext[Future[T]], isFinished: IsFinished, finishOnErr: bool = true): AsyncIter[T] =
|
||||
newAsyncIter[T](
|
||||
genNext,
|
||||
isFinished
|
||||
)
|
||||
|
||||
proc emptyAsyncIter*[T](): AsyncIter[T] =
|
||||
## Creates an empty AsyncIter
|
||||
##
|
||||
|
|
Loading…
Reference in New Issue