def fetch.all.go

bend-kit-http@0.38.2.0 · http.bend:4359

import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-concurrency@0.2.0.0/concurrency.bend as Conc

4359# No requests start no workers, since Conc.pool needs at least one.
4360def fetch.all.go(xs: List<Fetch>, +workers: Nat) -> IO(List<Result<&1, &1, Err, Res>>):
4361  match xs:
4362    case Nil{}:
4363      IO.pure(List<Result<&1, &1, Err, Res>>, Nil{})
4364    case x <> rest:
4365      do IO<List<Result<&1, &1, Err, Res>>>:
4366        r : List<Pool> & List<Result<&1, &1, Err, Res>> <-
4367          Conc.pool(~Pool, ~Fetch, ~Result<&1, &1, Err, Res>, ~fetch.all.job, fetch.all.pools(workers), x <> rest)
4368        fetch.all.done(r)

Uses (15)

Used by (1)