createEachJob method

  1. @visibleForOverriding
Job<void> createEachJob(
  1. Future<void> body(
    1. JobContext ctx
    ), {
  2. Object? key,
  3. String describe()?,
})

Creates the unstarted child used by each, named by key and describe.

Takes it from child, so an engine that overrides child has the children of each made the same way. Override this one only when a child of each needs more than child gives, or a check before it: it is called after the core has refused unattended work and a body that has ended, and before the child starts. key and describe come as the caller of each gave them, except that describe already holds the core's default, each, when the caller gave none. The result must be accepted by startChild. This factory must not start the child.

Implementation

@visibleForOverriding
Job<void> createEachJob(
  Future<void> Function(JobContext ctx) body, {
  Object? key,
  String Function()? describe,
}) => child<void>(body, key: key, describe: describe);