AnyEvent-Blackboard

 view release on metacpan or  search on metacpan

README.rst  view on Meta::CPAN

===============================================================================
AnyEvent::Blackboard
===============================================================================

AnyEvent::Blackboard is a data-driven workflow manager for asynchronous
applications.  It's designed to be used to control the ordering of asynchronous
actions which have data-dependencies, by allowing components to subscribe to
the publication of a named values on a per-request basis.

AnyEvent is used soley for the management of value timeouts, where asynchronous
actions are intended to fulfill parts of the request under tight time
constraints, where further action may take place in the absence of a value
being provided.

Development
-------------------------------------------------------------------------------
AnyEvent::Blackboard uses Module::Build for its build scripts.  It includes a
file in ``lib/`` called ``all.PL`` which imports the module, so that the
command ``./Build build`` will at minimum compile the module with ``perl``.

lib/AnyEvent/Blackboard.pm  view on Meta::CPAN

  my $blackboard = AnyEvent::Blackboard->new();

  $blackboard->watch([qw( foo bar )], [ $object, "found_foobar" ]);
  $blackboard->watch(foo => [ $object, "found_foo" ]);

  # After 250ms, provide ``undef'' for ``foo''
  $blackboard->timeout(foo => 0.25);

=head1 RATIONALE

Async::Blackboard makes a fantastic synchronization component -- however, it
does have the possible condition of allowing control to be abandoned due to a
lack value.  This subclass adds the functionality of timeouts on keys to ensure
this doesn't happen.

=cut

use strict;
use warnings FATAL => "all";

use AnyEvent;



( run in 0.270 second using v1.01-cache-2.11-cpan-0d8aa00de5b )