#!/usr/bin/env perl

use strict;
use warnings;

use lib 'definitions';

use Zing::Ring;
use Zing::Zang;

=pod explain

- see ./examples/00-zing-zang

- zing-ring joins process event-loops by acting as a turn-based actuator
- the zing-ring is itself a process which can be executed and watched
- only one process in the collection is executed per loop cycle
- when the ring is shutdown() it will shutdown() all processes in the collection


my $r = Zing::Ring->new(
  processes => [
    map Zing::Zang->new(on_perform => sub { warn shift->name }), 1..5

$r->exercise for 1..10;

$r->shutdown; # shutdown all processes