view release on metacpan or search on metacpan
lib/ArrayData/Word/EN/Enable.pm view on Meta::CPAN
asymptotes
asymptotic
asymptotically
asynapses
asynapsis
asynchronies
asynchronism
asynchronisms
asynchronous
asynchronously
asynchrony
asyndeta
asyndetic
asyndetically
asyndeton
asyndetons
lib/ArrayData/Word/EN/Enable.pm view on Meta::CPAN
geostrategist
geostrategists
geostrategy
geostrophic
geostrophically
geosynchronous
geosynclinal
geosyncline
geosynclines
geotactic
geotaxes
lib/ArrayData/Word/EN/Enable.pm view on Meta::CPAN
nonswimmers
nonsyllabic
nonsymbolic
nonsymmetric
nonsymmetrical
nonsynchronous
nonsystem
nonsystematic
nonsystemic
nonsystems
nontarget
lib/ArrayData/Word/EN/Enable.pm view on Meta::CPAN
syncategorematically
synced
synch
synched
synching
synchro
synchrocyclotron
synchrocyclotrons
synchromesh
synchromeshes
synchronal
synchroneities
synchroneity
synchronic
synchronical
synchronically
synchronicities
synchronicity
synchronies
synchronisation
synchronisations
synchronise
synchronised
synchronises
synchronising
synchronism
synchronisms
synchronistic
synchronization
synchronizations
synchronize
synchronized
synchronizer
synchronizers
synchronizes
synchronizing
synchronous
synchronously
synchronousness
synchronousnesses
synchrony
synchros
synchroscope
synchroscopes
synchrotron
synchrotrons
synchs
syncing
synclinal
syncline
synclines
lib/ArrayData/Word/EN/Enable.pm view on Meta::CPAN
unsymmetrical
unsymmetrically
unsympathetic
unsympathetically
unsymptomatic
unsynchronized
unsystematic
unsystematically
unsystematized
untack
untacked
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Artifactory/Client.pm view on Meta::CPAN
return $self->post($url);
}
=head2 push_docker_tag_to_bintray( dockerImage => 'jfrog/ubuntu:latest', async => 'true', ... )
Push Docker tag to Bintray. Calculation can be synchronous (the default) or asynchronous. You will need to enter your
Bintray credentials, for more details, please refer to Entering your Bintray credentials.
=cut
sub push_docker_tag_to_bintray {
lib/Artifactory/Client.pm view on Meta::CPAN
}
=head2 calculate_debian_repository_metadata( async => 0/1 )
Calculates/recalculates the Packages and Release metadata for this repository,based on the Debian packages in it.
Calculation can be synchronous (the default) or asynchronous.
=cut
sub calculate_debian_repository_metadata {
my ( $self, %args ) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Asterisk/AMI/Common.pm view on Meta::CPAN
WARNING: This method can block for a very long time (CTIMEOUT + TIMEOUT).
originate_async ( CHANNEL, CONTEXT, EXTEN [, CALLERID, CTIMEOUT, TIMEOUT ] )
Attempts to dial CHANNEL and then drops it into EXTEN@CONTEXT in the dialplan asynchronously. Optionally a CALLERID can be provided.
CTIMEOUT is optional and determines how long the call will dial/ring for in seconds. TIMEOUT is optional and only affects how long we will
wait for the initial response from Asterisk indicating if the call has been queued.
Returns 1 if the call was successfully queued, 0 on failure, or undef on error or timeout.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Asterisk/CoroManager.pm view on Meta::CPAN
asterisk manager interface.
L<http://www.voip-info.org/wiki/view/Asterisk+manager+API>
This is done with L<Coro>, and continuations. If you are unfamiliar
with L<Coro>, go read up on it! Your program should 'use Coro' quite
at the beginning, and be aware of that it is asynchronous. If you
wait for an answer to a sendcommand, other events will probably be
triggered in the meanwhile.
=head2 Logging / Error handling
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use 5.005;
use strict 'vars';
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
libnova-0.15.0/ltmain.sh view on Meta::CPAN
# add APPEND to the result, otherwise set result
# to NONDIR_REPLACEMENT.
# value returned in "$func_dirname_result"
# basename: Compute filename of FILE.
# value retuned in "$func_basename_result"
# Implementation must be kept synchronized with func_dirname
# and func_basename. For efficiency, we do not delegate to
# those functions but instead duplicate the functionality here.
func_dirname_and_basename ()
{
# Extract subdirectory from the argument.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use 5.004;
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
SkyX_Test.pl view on Meta::CPAN
sleep 1;
}
sub testsky6DirectGuide {
print "Testing 100% of sky6DirectGuide module.\n";
$SX->sky6DirectGuide->IAsynchronous(0);
print " IAsynchronous set to: " . $SX->sky6DirectGuide->IAsynchronous . "\n";
$SX->sky6DirectGuide->MoveTelescope(900,900);
print "Finished testing sky6DirectGuide module.\n";
sleep 1;
}
SkyX_Test.pl view on Meta::CPAN
my $target = shift;
print "Testing sky6RASCOMTele module.\n";
# Abort() - Not tested
# CommutateMotors - Not tested.
print " Connecting to mount, Set Asynchronous mode off, and Unpark\n";
$SX->sky6RASCOMTele->Connect();
if ($SX->sky6RASCOMTele->IsConnected) {
print " Connected to Telescope. \n";
}else{
print " Did not connect to Telescope! \n";
}
$SX->sky6RASCOMTele->Asynchronous(0);
$SX->sky6RASCOMTele->Unpark();
# DoCommand() - Not tested (I have a paramount)
print " Testing FindHome\n";
$SX->sky6RASCOMTele->FindHome();
print " Home.\n";
SkyX_Test.pl view on Meta::CPAN
# We'll use this later
# ccdsoftCamera::LastImageFileName
$SX->ccdsoftCamera->Autoguider(0);
$SX->ccdsoftCamera->Frame(1);
$SX->ccdsoftCamera->Connect();
$SX->ccdsoftCamera->Asynchronous(0);
$SX->ccdsoftCamera->ImageUseDigitizedSkySurvey(1);
$SX->ccdsoftCamera->AutoSaveOn(1);
print " Taking photo (DSS)\n";
$SX->ccdsoftCamera->ExposureTime(1);
$SX->ccdsoftCamera->TakeImage();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/SpaceTrack.pm view on Meta::CPAN
tle => {
EPOCH => '>now-30',
},
# number => 1,
},
geosynchronous => { # GEO
name => 'Geosynchronous satellites',
# As of 2026-01-19
# https://www.space-track.org/basicspacedata/query/class/gp/EPOCH/%3Enow-30/MEAN_MOTION/0.99--1.01/ECCENTRICITY/%3C0.01/OBJECT_TYPE/payload/orderby/NORAD_CAT_ID,EPOCH/format/3le
# number => 3,
# We have to go through satcat to eliminate bodies that
# are not on orbit, since tle_latest includes bodies
lib/Astro/SpaceTrack.pm view on Meta::CPAN
tle => {
EPOCH => '>now-30',
},
# number => 23,
},
bright_geosynchronous => {
favorite => 'brightgeo',
name => 'Bright Geosynchronous satellites',
tle => {
EPOCH => '>now-30',
},
},
human_spaceflight => {
lib/Astro/SpaceTrack.pm view on Meta::CPAN
Name Description
full Full catalog
payloads All payloads
* navigation Navigation satellites
* weather Weather satellites
geosynchronous Geosynchronous bodies
iridium Iridium satellites
orbcomm OrbComm satellites
globalstar Globalstar satellites
intelsat Intelsat satellites
inmarsat Inmarsat satellites
* amateur Amateur Radio satellites
* visible Visible satellites
* special Special satellites
* bright_geosynchronous
Bright Geosynchronous satellites
* human_spaceflight
Human Spaceflight
well_tracked_objects
Well-Tracked Objects not associated
with a specific launch
lib/Astro/SpaceTrack.pm view on Meta::CPAN
navigation => _MASTER_FAVORITE_DEPRECATION_LEVEL,
weather => _MASTER_FAVORITE_DEPRECATION_LEVEL,
amateur => _MASTER_FAVORITE_DEPRECATION_LEVEL,
visible => _MASTER_FAVORITE_DEPRECATION_LEVEL,
special => _MASTER_FAVORITE_DEPRECATION_LEVEL,
bright_geosynchronous => _MASTER_FAVORITE_DEPRECATION_LEVEL,
human_spaceflight => _MASTER_FAVORITE_DEPRECATION_LEVEL,
},
);
sub _deprecation_notice {
view all matches for this distribution
view release on metacpan or search on metacpan
doc/astronomical-notes.pod view on Meta::CPAN
Although this text is stored in the L<Astro::Sunrise> repository, it
also documents the L<DateTime::Event::Sunrise> module, which has a
very similar core (astronomical computations) and a different API.
Since both modules move at different speeds, it may happen that the
text you are reading is not synchronised with the L<Astro::Sunrise>
module.
=head1 Why This Text? For Whom?
The main purpose of this text is to explain how the sunrises
doc/astronomical-notes.pod view on Meta::CPAN
The variation of the duration of the day is a tiny
variation, but with our modern measure instruments, we
can measure it. Since the time when scientists abolished the
astronomical standard of time for an atomic
standard, it has been necessary to add 27 leap seconds
over 47 years to synchronise the atomic timescale with
the Earth's spin.
For the moment, all adjustments have consisted in
adding a leap second. But it can happen that we
would have to synchronise in the other direction by removing
a second. So this phenomenon produces fluctuations
rather than a slow drift in a single direction.
=head3 The Equation Of Time
doc/astronomical-notes.pod view on Meta::CPAN
The concept of I<Mean Sun> is a virtual Sun like this, calibrated so it crosses
the meridian at 12:00 (Local Mean Time) each day, and which minimizes the difference
between the real local noon and the mean local noon.
I will also consider several "virtual homocinetic suns" or VHS (no relation with
magnetic tapes). These virtal suns are synchronised with the real Sun at some
convenient point and then move with a constant angular speed.
=head1 Computing Sunrise and Sunset
Computing sunrise and sunset consists in taking in account both the variation of
doc/astronomical-notes.pod view on Meta::CPAN
Let us look a bit farther into the past. In January 2019, I published
version 0.98 of L<Astro::Sunrise>, with the precise algorithm
implemented as explained in the preceding paragraph. For test data, I
did not know how to cross-check with authoritative sources, so I just
checked they looked plausible and that the iterative computation
stopped after a few iterations. At this time, I did not synchronise
L<DateTime::Event::Sunrise> with L<Astro::Sunrise>, because it was not
the proper time yet.
Then in April 2020, a user created an RT ticket, explaining that he
had compared the results of L<DateTime::Event::Sunrise> with
authoritative websites and that the results were not precise enough.
Of course the results were not precise, I had not yet synchronised
L<DateTime::Event::Sunrise> with L<Astro::Sunrise>. Yet this ticket
gave me two things: first, a website which would provide precise
day-after-day computations of sunrise, sunset and real solar noon, and
second a few round tuits to upgrade L<DateTime::Event::Sunrise> to the
same level as L<Astro::Sunrise>, with real tests values.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use 5.004;
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/Coord/ECI.pm view on Meta::CPAN
my $denom = $body->mean_angular_velocity -
$self->mean_angular_velocity;
## my $retro = $denom >= 0 ? 0 : 1;
($denom = abs ($denom)) < 1e-11 and croak <<eod;
Error - The next_azimuth() method will not work for geosynchronous
bodies.
eod
my $apparent = TWOPI / $denom;
my $begin = $self->universal;
lib/Astro/Coord/ECI.pm view on Meta::CPAN
The current time of both C<$coord> and C<$body> objects are left at the
returned time.
The algorithm is by successive approximation. It will croak if the
period of the C<$body> is close to synchronous, and will probably not
work well for bodies in highly eccentric orbits. The calculation is to
the nearest second, and the time returned is the first even second after
the body crosses the meridian.
=item ( $time, $above ) = $coord->next_meridian( $want )
lib/Astro/Coord/ECI.pm view on Meta::CPAN
The current time of both C<$coord> and its C<station> are left at the
returned time.
The algorithm is by successive approximation. It will croak if the
period of the C<$body> is close to synchronous, and will probably not
work well for bodies in highly eccentric orbits. The calculation is to
the nearest second, and the time returned is the first even second after
the body crosses the meridian.
=cut
lib/Astro/Coord/ECI.pm view on Meta::CPAN
my $denom = $body->mean_angular_velocity -
$self->mean_angular_velocity;
my $retro = $denom >= 0 ? 0 : 1;
($denom = abs ($denom)) < 1e-11 and croak <<'EOD';
Error - The next_meridian() method will not work for geosynchronous
bodies.
EOD
my $apparent = TWOPI / $denom;
my $begin = $self->universal;
view all matches for this distribution
view release on metacpan or search on metacpan
===============================================================================
Async::Blackboard
===============================================================================
Async::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.
Async 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
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/Chain.pm view on Meta::CPAN
log(...);
};
=head1 RATIONALE
A asynchronous code often have deep nested callbacks, therefore it is tangled
and hard to change. This module help to converta a code like following to some
more readable form. Also, with C<chain> you can easily skip some unneeded steps
in this thread. For example jump to log step after the first failed query in
the chain.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/Event/Interval.pm view on Meta::CPAN
__END__
=head1 NAME
Async::Event::Interval - Scheduled and one-off restartable asynchronous events
=for html
<a href="https://github.com/stevieb9/async-event-interval/actions"><img src="https://github.com/stevieb9/async-event-interval/workflows/CI/badge.svg"/></a>
<a href='https://coveralls.io/github/stevieb9/async-event-interval?branch=master'><img src='https://coveralls.io/repos/stevieb9/async-event-interval/badge.svg?branch=master&service=github' alt='Coverage Status' /></a>
=head1 SYNOPSIS
Here's an example of a simple asynchronous event that fetches JSON data from a
website every two seconds using a shared scalar variable to hold the decoded
JSON hashref, while allowing the main application to continue running in the
foreground. Multiple events can be used simultaneously if desired.
See the L</SCENARIOS/EXAMPLES> section for further usage examples.
lib/Async/Event/Interval.pm view on Meta::CPAN
}
=head1 DESCRIPTION
Very basic implementation of asynchronous events triggered by a timed interval.
If a time of zero is specified, we'll run the event only once while providing
the ability to re-run it manually at any time in the future.
B<Signal handling>: The module installs C<$SIG{INT}> and C<$SIG{TERM}>
handlers at load time to ensure shared memory segments are cleaned up when the
view all matches for this distribution
view release on metacpan or search on metacpan
{
my $self = shift ;
warn "$self->{name} ",shift if $self->{test} ;
}
# Call a set of asynchronous functions which MUST have their set of user
# callbacks.. Note that the user call-back invoked when the function MUST
# call the asyncDone function with a result.
#
# When all function calls are over (i.e. all call-back were performed)
# all the returned results are logically 'anded' and the resulting result
# initialize
$self->{result} = 1 ;
$self->{out} = '' ;
# compute nb of asynchronous calls that will be done
$self->{onGoing} = scalar (@{$args{set}}) ;
# make up some log message
$self->printEvent("asynCall called for ".
$self->{onGoing}." calls");
__END__
=head1 NAME
Async::Group - Perl class to deal with simultaneous asynchronous calls
=head1 SYNOPSIS
use Async::Group ;
use strict ;
)
=head1 DESCRIPTION
If you sometimes have to launch several asynchronous calls in
parrallel and want to call one call-back function when all these calls
are finished, this module may be for you.
Async::Group is a class which enables you to call several asynchronous
routines. Each routine may have their own callback. When all the
routine are over (i.e. all their callback were called), Async::Group
will call the global callback given by the user.
Note that one Async::Group objects must be created for each group of
- callback : global user callback function
=head2 callDone(result, [string])
Function to be called back each time an asynchronous call is finished.
When all function calls are over (i.e. all call-back were performed)
all the returned results are logically 'anded', the passed strings are
concatenated and the resulting result is passed to the global user
call-back function passed with the run() method.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/Hooks.pm view on Meta::CPAN
package Async::Hooks;
{
$Async::Hooks::VERSION = '0.16';
}
# ABSTRACT: Hook system with asynchronous capabilities
use Mo qw(is default);
use Carp 'confess';
use Async::Hooks::Ctl;
use namespace::clean;
lib/Async/Hooks.pm view on Meta::CPAN
__END__
=pod
=head1 NAME
Async::Hooks - Hook system with asynchronous capabilities
=head1 VERSION
version 0.16
lib/Async/Hooks.pm view on Meta::CPAN
important state modifications.
There are other modules that provide the same functionality (see
L<SEE ALSO> section). The biggest diference is that you can pause
processing of the chain of callbacks at any point and start a
asynchronous network request, and resume processing when that request
completes.
Developers are not expect to subclass from C<Async::Hooks>. The
recomended usage is to stick a C<Async::Hooks> instance in a slot or as
a singleton for your whole app, and then delegate some methods to it.
lib/Async/Hooks.pm view on Meta::CPAN
C<< $ctl->decline() >> or C<< $ctl->done() >>. You can also use
C<next()> or C<declined()> as alias to C<decline()>, and C<stop()>
as alias to C<done()>, whatever feels better.
But you can delay that decision. You can start a network request,
asynchronously, and only decide to decline or stop when the response
arrives. For example, if you use the L<AnyEvent::HTTP|AnyEvent::HTTP>
module to make a HTTP request, you could do something like this:
sub check_server_is_up_cb {
my ($ctl, $args) = @_;
lib/Async/Hooks.pm view on Meta::CPAN
=item * L<Notification::Center|Notification::Center>
=back
Of those four, only L<Object::Event|Object::Event> version 1.0 and later
provides the same ability to pause a chain, do some asynchrounous work
and resume chain processing later.
=head1 ACKNOWLEDGEMENTS
The code was inspired by the C<run_hook_chain> and C<hook_chain_fast>
view all matches for this distribution
view release on metacpan or search on metacpan
Interrupt.pm view on Meta::CPAN
=head1 NAME
Async::Interrupt - allow C/XS libraries to interrupt perl asynchronously
=head1 SYNOPSIS
use Async::Interrupt;
=head1 DESCRIPTION
This module implements a single feature only of interest to advanced perl
modules, namely asynchronous interruptions (think "UNIX signals", which
are very similar).
Sometimes, modules wish to run code asynchronously (in another thread,
or from a signal handler), and then signal the perl interpreter on
certain events. One common way is to write some data to a pipe and use an
event handling toolkit to watch for I/O events. Another way is to send
a signal. Those methods are slow, and in the case of a pipe, also not
asynchronous - it won't interrupt a running perl interpreter.
This module implements asynchronous notifications that enable you to
signal running perl code from another thread, asynchronously, and
sometimes even without using a single syscall.
=head2 USAGE SCENARIOS
=over 4
Interrupt.pm view on Meta::CPAN
cb => \&_signal_check, # defined later
);
Then, for each signal to hook, create an Async::Interrupt object. The
callback just sets a global variable, as we are only interested in
synchronous signals (i.e. when the event loop polls), which is why the
pipe draining is not done automatically.
my $interrupt = new Async::Interrupt
cb => sub { undef $SIGNAL_RECEIVED{$signum} },
signal => $signum,
Interrupt.pm view on Meta::CPAN
$self
}
=item ($signal_func, $signal_arg) = $async->signal_func
Returns the address of a function to call asynchronously. The function
has the following prototype and needs to be passed the specified
C<$signal_arg>, which is a C<void *> cast to C<IV>:
void (*signal_func) (void *signal_arg, int value)
Interrupt.pm view on Meta::CPAN
C<$value> must be in the valid range for a C<sig_atomic_t>, except C<0>
(1..127 is portable).
If the function is called while the Async::Interrupt object is already
signaled but before the callbacks are being executed, then the stored
C<value> is either the old or the new one. Due to the asynchronous
nature of the code, the C<value> can even be passed to two consecutive
invocations of the callback.
=item $address = $async->c_var
Interrupt.pm view on Meta::CPAN
This method does not need to be called normally, as it will be invoked
automatically. However, it can be used to force handling of outstanding
interrupts while the object is blocked.
One reason why one might want to do that is when you want to switch
from asynchronous interruptions to synchronous one, using e.g. an event
loop. To do that, one would first C<< $async->block >> the interrupt
object, then register a read watcher on the C<pipe_fileno> that calls C<<
$async->handle >>.
This disables asynchronous interruptions, but ensures that interrupts are
handled by the event loop.
=item $async->signal_hysteresis ($enable)
Enables or disables signal hysteresis (default: disabled). If a POSIX
Interrupt.pm view on Meta::CPAN
=back
=head1 THE Async::Interrupt::EventPipe CLASS
Pipes are the predominant utility to make asynchronous signals
synchronous. However, pipes are hard to come by: they don't exist on the
broken windows platform, and on GNU/Linux systems, you might want to use
an C<eventfd> instead.
This class creates selectable event pipes in a portable fashion: on
windows, it will try to create a tcp socket pair, on GNU/Linux, it will
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/MergePoint.pm view on Meta::CPAN
use Carp;
=head1 NAME
C<Async::MergePoint> - resynchronise diverged control flow
=head1 SYNOPSIS
use Async::MergePoint;
lib/Async/MergePoint.pm view on Meta::CPAN
Often in program logic, multiple different steps need to be taken that are
independent of each other, but their total result is needed before the next
step can be taken. In synchonous code, the usual approach is to do them
sequentially.
An asynchronous or event-based program could do this, but if each step
involves some IO idle time, better overall performance can often be gained by
running the steps in parallel. A C<Async::MergePoint> object can then be used
to wait for all of the steps to complete, before passing the combined result
of each step on to the next stage.
lib/Async/MergePoint.pm view on Meta::CPAN
complete. When all of the required items are so marked, the C<on_finished>
continuation is invoked.
For use cases where code may be split across several different lexical scopes,
it may not be convenient or possible to share a lexical variable, to pass on
the result of some asynchronous operation. In these cases, when an item is
marked as complete a value can also be provided which contains the results of
that step. The C<on_finished> callback is passed a hash (in list form, rather
than by reference) of the collected item values.
This module was originally part of the L<IO::Async> distribution, but was
lib/Async/MergePoint.pm view on Meta::CPAN
}
}
=head1 EXAMPLES
=head2 Asynchronous Plugins
Consider a program using C<Module::Pluggable> to provide a plugin architecture
to respond to events, where sometimes the response to an event may require
asynchronous work. A C<MergePoint> object can be used to coordinate the
responses from the plugins to this event.
my $merge = Async::MergePoint->new();
foreach my $plugin ( $self->plugins ) {
lib/Async/MergePoint.pm view on Meta::CPAN
....
$merge->needs( __PACKAGE__ );
$merge->done( __PACKAGE__ => $result );
}
Whereas, to handle the event asynchronously the plugin can instead perform:
sub handle_event
{
my ( $event, $merge, @args ) = @_;
....
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/Methods.pm view on Meta::CPAN
use Mojo::UserAgent;
my $ua = Mojo::UserAgent->new;
# Normal synchronous code
print $ua->get('http://trout.me.uk/')->result->body;
# Equivalent code running synchronously atop promises
print $ua->get_p('http://trout.me.uk')->then::result->await::body;
# Equivalent code within an async subroutine
lib/Async/Methods.pm view on Meta::CPAN
print fetch($url)->await::this;
=head1 DESCRIPTION
L<Async::Methods> provides a set of helper methods operating via namespace
that make chaining together asynchronous methods easier. This is not at all
meant to be a replacement for the C<async> and C<await> keywords available
via L<Future::AsyncAwait> or the C<-async_await> flag to L<Mojo::Base> and
in fact is largely meant to be used I<with> such facilities.
Note that in the following code I use C<$p> for example variables but they
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/Microservice/Time.pm view on Meta::CPAN
curl "http://localhost:8085/v1/epoch" -H "accept: application/json"
curl "http://localhost:8085/v1/datetime?time_zone=local" -H "accept: application/json"
=head1 DESCRIPTION
This is an example asynchronous HTTP microservice using
L<Async::Microservice>. View the source code; it's minimal.
=head1 METHODS
=head2 service_name
view all matches for this distribution
view release on metacpan or search on metacpan
__END__
=head1 NAME
Async - Asynchronous evaluation of Perl code (with optional timeouts)
=head1 SYNOPSIS
my $proc = Async->new( sub { any perl code you want executed } );
=head1 DESCRIPTION
This module runs some code in a separate process and retrieves its
result. Since the code is running in a separate process, your main
program can continue with whatever it was doing while the separate
code is executing. This separate code is called an I<asynchronous
computation>.
=head1 INTERFACE
To check if the asynchronous computation is complete you can call
the C<ready()>
method, which returns true if so, and false if it is still running.
After the asynchronous computation is complete, you should call the
C<error()> method to make sure that everything went all right.
C<error()> will return C<undef> if the computation completed normally,
and an error message otherwise.
Data returned by the computation can be retrieved with the C<result()>
returned by the computation will be stringified. (See AsyncData below
for how to avoid this.) If the computation has not completed yet,
C<result()> will return an undefined value.
C<result()> takes an optional parameter, C<$force>. If C<$force> is
true, then the calling process will wait until the asynchronous
computation is complete before returning.
=head2 C<AsyncTimeout>
use Async;
$proc = AsyncTimeout->new( sub { ... }, $timeout, $special );
C<AsyncTimeout> implements a version of C<Async> that has an
automatic timeout. If the asynchronous computation does not complete
before C<$timeout> seconds have elapsed, it is forcibly terminated and
returns a special value C<$special>. The default special value is the
string "Timed out\n".
All the other methods for C<AsyncTimeout> are exactly the same as for
use Async;
$proc = AsyncData->new( sub { ... } );
C<AsyncData> is just like C<Async> except that instead of returning a
string, the asynchronous computation may return any scalar value. If
the scalar value is a reference, the C<result()> method will yield a
refernce to a copy of this data structure.
The C<AsyncData> module requires that C<Storable> be installed.
C<AsyncData::new> will die if C<Storable> is unavailable.
All the other methods for C<AsyncData> are exactly the same as for
C<Async>.
=head1 WARNINGS FOR THE PROGRAMMER
The asynchronous computation takes place in a separate process, so
nothing it does can affect the main program. For example, if it
modifies global variables, changes the current directory, opens and
closes filehandles, or calls C<die>, the parent process will be
unaware of these things. However, the asynchronous computation does
inherit the main program's file handles, so if it reads data from
files that the main program had open, that data will not be availble
to the main program; similarly the asynchronous computation can write
data to the same file as the main program if it inherits an open
filehandle for that file.
=head1 ERRORS
Couldn't make pipe: (reason)
Couldn't fork: (reason)
Read error: (reason)
If your asynchronous computation dies for any reason, that is not
considered to be an I<error>; that is the normal termination of the
process. Any messages written to C<STDERR> will go to the
computation's C<STDERR>, which is normally inherited from the main
program, and the C<result()> will be the empty string.
view all matches for this distribution