Supervisor<G extends Grunt>.debug constructor

Supervisor<G extends Grunt>.debug(
  1. GruntFactory<G> fn
)

Implementation

factory Supervisor.debug(GruntFactory<G> fn) {
  final spv = DuplexChannel.memory(fn.encoding);
  final grnt = DuplexChannel.memory(fn.encoding);
  spv.connect(grnt);
  var supervisor = Supervisor<G>(gruntType: G, grunt: spv);
  final grunt = fn.create();
  GruntChannel(boss: grnt, grunt: grunt);
  return supervisor;
}