ActorGroup<M, A>.create constructor
ActorGroup<M, A>.create (
- Handler<
M, A> createHandler(), { - int size = 6,
- GroupStrategy<
M, A> ? strategy,
Creates an ActorGroup with the given size that handles messages using the given Handler.
A GroupStrategy may be provided, defaulting to RoundRobin.
Use the of constructor to wrap a function directly.
Implementation
ActorGroup.create(Handler<M, A> Function() createHandler,
{this.size = 6, GroupStrategy<M, A>? strategy})
: _group = _Group(
_buildActors(size, createHandler), strategy ?? RoundRobin<M, A>());