Zing::Poll - Blocking Receive
Blocking Receive Construct
use Zing::Poll; use Zing::KeyVal; my $poll = Zing::Poll->new(repo => Zing::KeyVal->new(name => 'notes')); # $poll->await(0);
This package provides an algorithm for preforming a blocking receive by polling the datastore for a specific item.
This package uses type constraints from:
Zing::Types
This package has the following attributes:
repo(Repo)
This attribute is read-only, accepts (Repo) values, and is required.
(Repo)
This package implements the following methods:
await(Int $secs) : Maybe[HashRef]
The await method polls the datastore specified for the data at the key specified, for at-least the number of seconds specified, and returns the data or undefined.
# given: synopsis $poll->await(0);
# given: synopsis $poll->repo->send({ task => 'write research paper' }); $poll->await(0);
Al Newkirk, awncorp@cpan.org
awncorp@cpan.org
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".
Wiki
Project
Initiatives
Milestones
Contributing
Issues
To install Zing, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Zing
CPAN shell
perl -MCPAN -e shell install Zing
For more information on module installation, please visit the detailed CPAN module installation guide.