def drain.wait

bend-kit-runner@0.13.0.1 · runner.bend:1669

import bend-kit-runner@0.13.0.1/runner.bend as Runner
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import bend-kit-retry@0.3.0.0/retry.bend as Retry

1669def drain.wait(~A: Data, ~penc: A -> Bytes.Bytes, ~target: A -> String, ~work: A -> IO(Retry.Outcome), +idle: U32, r: Runner<A>,
1670    next: Runner<A> -> IO(Ran(A))) -> IO(Ran(A)):
1671  Runner{j, s, p, c, +ib, fs} = r
1672  do IO<Ran(A)>:
1673    x : Poll<&1, &1, Maybe<&1, Msg<A>>, Unit> <- Chan.try_recv(Msg<A>, ib, idle)
1674    drain.woke(~A, ~penc, ~target, ~work, idle, x, Runner{j, s, p, c, ib, fs}, next)

Uses (14)

Used by (1)