MultiBurst constructor

MultiBurst({
  1. int threadCount = 4,
})

Implementation

MultiBurst({int threadCount = 4})
    : threads = List.generate(
          threadCount,
          (index) => Thread((e) {
                Burst burst = Burst();
                e.on("q", (BurstRunner runner) {
                  burst.queue(runner);
                  e.emit("k");
                });
                e.on("f",
                    (data) => burst.flush().then((value) => e.emit("k")));
                e.on("ff",
                    (data) => burst.fullFlush().then((value) => e.emit("k")));
              }, start: true)),
      super();