applyWorker<A, S> function

Future applyWorker<A, S>(
  1. Stream<A> actionStream,
  2. WorkerContext<S> context,
  3. Worker<A, S> worker
)

Implementation

Future applyWorker<A, S>(
  Stream<A> actionStream,
  WorkerContext<S> context,
  Worker<A, S> worker
) async {
  await actionStream.forEach((action) async {
    await worker.work(context, action);
  });
}