The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Zing::Ring - Process Ring

ABSTRACT

Multi-Process Assembly Ring

SYNOPSIS

  use Zing::Ring;
  use Zing::Process;

  my $ring = Zing::Ring->new(processes => [
    Zing::Process->new,
    Zing::Process->new,
  ]);

  # $ring->execute;

DESCRIPTION

This package provides a mechanism for joining two (or more) processes and executes them as one in a turn-based manner.

INHERITS

This package inherits behaviors from:

Zing::Process

LIBRARIES

This package uses type constraints from:

Zing::Types

ATTRIBUTES

This package has the following attributes:

processes

  processes(ArrayRef[Process])

This attribute is read-only, accepts (ArrayRef[Process]) values, and is required.

METHODS

This package implements the following methods:

destroy

  destroy() : Object

The destroy method executes the destroy method of all the processes in the list.

destroy example #1
  # given: synopsis

  [$ring, $ring->destroy]

perform

  perform() : Any

The perform method executes the event-loop of the next process in the list with each call.

perform example #1
  # given: synopsis

  [$ring, $ring->perform]

shutdown

  shutdown() : Object

The shutdown method executes the shutdown method of all the processes in the list.

shutdown example #1
  # given: synopsis

  [$ring, $ring->shutdown]

winddown

  winddown() : Object

The winddown method executes the winddown method of all the processes in the list.

winddown example #1
  # given: synopsis

  [$ring, $ring->winddown]

AUTHOR

Al Newkirk, awncorp@cpan.org

LICENSE

Copyright (C) 2011-2019, Al Newkirk, et al.

This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".

PROJECT

Wiki

Project

Initiatives

Milestones

Contributing

Issues