view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Parataxis.pm view on Meta::CPAN
#
# The wait-reason record is [reason, file, line] plus a fourth element, a bounded backtrace of the
# user-side callchain (caller frames from just below the recorded site back to the fiber body). Capturing it
# is a short caller() loop (~100ns per frame), so it runs unconditionally; backtrace_depth(0) disables it.
# On the *re-entry* after the yield returns, a pending interrupt (set by _interrupt) is consumed and thrown, so a
# cancelled wait unwinds with Acme::Parataxis::Error::Cancelled (or ::Timeout) right here the caller of the wait
# sees the parked wait's own reason in the error's wait_reason.
#
# $dereg, when given, is a coderef that removes the *parking* fiber from whatever waiter list it is parked on
# (Semaphore/Signal/Future/child-await). It runs only when this park is interrupted, before the error is thrown, so
# a cancelled fiber never leaves a stale id behind that a later wake could fire at a reused fiber.
lib/Acme/Parataxis.pm view on Meta::CPAN
if $ENV{PARATAXIS_TRACE};
$fiber->[F_INTERRUPT] = undef;
delete $PARKED{$fid};
if ( my $dereg = delete $PARK_REGS{$fid} ) { $dereg->() }
warn "PARATAXIS_TRACE park RE-ENTRY fail-fast fid=$fid reason=$reason pre=$pre\n" if $ENV{PARATAXIS_TRACE};
my $err = $pre eq 'timeout' ? Acme::Parataxis::Error::Timeout->new( wait_reason => $pre_site ) :
Acme::Parataxis::Error::Cancelled->new( wait_reason => $pre_site );
die $err;
}
# A cancellation scope whose token already fired makes every further wait fail fast too: once the fiber's
lib/Acme/Parataxis.pm view on Meta::CPAN
}
# Enclosing with_timeout deadlines bound this park. Every with_timeout whose execution this fiber is
# inside pushed an absolute deadline (in ms) onto F_DEADLINE_SCOPES; the innermost/soonest one wins as the
# effective bound and the outermost is the backstop. Three consequences, in order:
# (a) an already-passed effective bound makes a fresh wait fail fast with Error::Timeout instead of parking
# forever - without this, a caught Timeout followed by a re-park under the same fired deadline deadlocked
# (nothing was left to interrupt the wait); the check is the bound's own cancellable token being set, not
# just the arithmetic (left <= 0), because the deadline helper's timer may fire marginally before the wall
# clock reaches abs - a re-park landing in that window would otherwise be missed by the arithmetic and
# (since the bound is armed already) would park with nothing left to interrupt it;
# (b) exactly one deadline helper is armed per fiber for its effective bound and reused across re-parks
lib/Acme/Parataxis.pm view on Meta::CPAN
delete $PARKED{$fid};
if ( my $old = delete $PARK_REGS{$fid} ) { $old->() }
$dereg->() if $dereg; # as above: this park's own waiter entry is stale too
warn "PARATAXIS_TRACE park DEADLINE fail-fast fid=$fid reason=$reason abs=" . $eff->{abs} . " now=$now\n"
if $ENV{PARATAXIS_TRACE};
die Acme::Parataxis::Error::Timeout->new( wait_reason => [ 'timeout', $pfile, $pline ] );
}
if ( $eff->{own} ) {
my $already = $fiber->[F_DEADLINE_ARMED];
if ( defined $already && $already == $eff->{abs} ) {
warn sprintf "PARATAXIS_TRACE t=%.0fms fid=%d park DEADLINE reuse abs=%.0f (already armed)\n", ( time - $^T ) * 1000, $fid,
lib/Acme/Parataxis.pm view on Meta::CPAN
( defined $site ? $site->[1] . ':' . $site->[2] : 'n/a' )
if $ENV{PARATAXIS_TRACE};
$fiber->[F_INTERRUPT] = undef;
delete $PARKED{$fid};
if ( my $dereg = delete $PARK_REGS{$fid} ) { $dereg->() }
my $err = $kind eq 'timeout' ? Acme::Parataxis::Error::Timeout->new( wait_reason => $site ) :
Acme::Parataxis::Error::Cancelled->new( wait_reason => $site );
die $err;
}
return $res;
}
lib/Acme/Parataxis.pm view on Meta::CPAN
push @{ $fiber->[F_WAKE_HOOKS] }, $code;
return $code;
}
# Runs $code as a child fiber with a deadline of $ms milliseconds and returns its value, or throws
# Acme::Parataxis::Error::Timeout when the deadline fires first. An optional Acme::Parataxis::CancellationToken
# before $code cancels the block like an external deadline. A 0 or undef $ms means no deadline.
#
# The block runs as a child fiber in the same scheduler, so cooperative waits inside it (await_sleep, ->await,
# ->wait, semaphore/signal/channel ops) suspend only the block's fiber. When a token fires, the child's parked wait
# is interrupted at its park re-entry and the child unwinds (unregistering from the tokens as it goes);
# with_timeout rethrows the resulting error (::Timeout or ::Cancelled) in this fiber, so it can be caught with
# eval/try.
#
# The deadline is enforced per-park by _park from a per-fiber scope stack (F_DEADLINE_SCOPES). This
# child pushes its bound onto that stack (inheriting the enclosing with_timeouts of the spawning fiber, so a
# nested block's parks are bounded by the whole chain, innermost/soonest first and the outermost as the backstop)
# and _park derives the effective bound, fails fast when it has already passed (a caught Timeout followed by a
# re-park under the same fired deadline throws again instead of deadlocking), and arms exactly one deadline helper
# per fiber for its bound - reused across re-parks, so no second timer is ever stacked for the same bound. When
# the block finishes (or is itself interrupted) teardown's token cancel recalls the helper's armed sleep and the
# worker is freed instead of staying occupied for the whole bound; no helper is armed at all when the block never
# parks or when $ms is 0.
lib/Acme/Parataxis.pm view on Meta::CPAN
$err = $e
}
$deadline->unregister;
$tok->unregister if $tok ne $deadline;
pop @{ $cf->[F_DEADLINE_SCOPES] } if defined $scope_abs; # leave the stack for any enclosing scope
die $err if $err; # the ::Timeout/::Cancelled throw (or any real error) unwinds out of the child
return $val;
};
# The block finished synchronously: the value (or an inline error, already rethrown by spawn) is final. Skipping
# the deadline also means a quick inlined block never pins its run.
lib/Acme/Parataxis.pm view on Meta::CPAN
# fires first ends the wait while teardown drops the others' registrations.
#
# Return convention (context aware): the scope token alone in scalar/void context, the token prepended to the
# block's value(s) in list context (my ($tok, @vals) = with_cancel sub { ... }). On failure the block's own
# error propagates unchanged (the real error wins over a concurrently arriving cancel); if the scope itself was
# cancelled by an outer token while the block ran to completion, Error::Cancelled (or Timeout for a deadline)
# is thrown at the scope boundary instead of swallowing the interrupt.
sub with_cancel {
my $o = _arg_offset( $_[0] );
my $code = $_[$o];
@_ = ();
lib/Acme/Parataxis.pm view on Meta::CPAN
if ( my $kind = $fiber->[F_INTERRUPT] ) {
# The block returned normally but an outer token/deadline fired while it ran: consume the marker and
# convert it to the matching error so the cancellation is never silently swallowed at this boundary.
$fiber->[F_INTERRUPT] = undef;
die $kind eq 'timeout' ? Acme::Parataxis::Error::Timeout->new : Acme::Parataxis::Error::Cancelled->new;
}
return wantarray ? ( $tok, @val ) : $tok;
}
# STM (software transactional memory). atomically() runs $code as one transaction on the calling fiber: reads are
lib/Acme/Parataxis.pm view on Meta::CPAN
my $dereg = sub { $driver->cancel_timer($id) unless $fired };
return _park( 'await_sleep', 1, $dereg );
}
# Register a read/write watch on the attached loop, arm the wait's own deadline timer, and park. Natural wake
# returns 1; the wait's own deadline swallows its ::Timeout and returns -1 like the pool path does; an *enclosing*
# with_timeout / nursery interrupt did not cancel our deadline token, so it propagates by dying.
#
my $WARNED_FD_SETSIZE = 0;
sub _driver_wait ( $driver, $fh, $dir, $timeout, $reason ) {
lib/Acme/Parataxis.pm view on Meta::CPAN
my $err;
try { Acme::Parataxis::_park( $reason, 1, $dereg ) }
catch ($e) { $ok = 0; $err = $e }
finally { $dereg->() } # idempotent: on an interrupt _park already ran it, on a natural wake this is the cleanup
if ( !$ok ) {
if ( defined $deadline && $deadline->cancelled && ref($err) && $err->isa('Acme::Parataxis::Error::Timeout') ) {
$out = -1; # this wait's own deadline expired; the pool path resumes (not throws) on timeout
}
else { $dying = $err }
}
$deadline->unregister if defined $deadline;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/IO/Async/Loop.pm view on Meta::CPAN
$loop->timeout_future( %args )->get
Returns a new L<IO::Async::Future> instance which will fail at a given point
in time. The C<%args> should contain an C<at> or C<after> key as per the
C<watch_time> method. The returned future may be cancelled to cancel the
timer. At the alloted time, the future will fail with the string C<"Timeout">.
=cut
sub timeout_future
{
my $self = shift;
my %args = @_;
my $future = $self->new_future;
my $id = $self->watch_time( %args,
code => sub { $future->fail( "Timeout" ) },
);
$future->on_cancel( sub { shift->loop->unwatch_time( $id ) } );
return $future;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acrux/Const.pm view on Meta::CPAN
use Config qw//;
use File::Spec qw//;
use constant {
# System constants
IS_TTY => !!(-t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT))), # See Prompt::Timeout
IS_ROOT => !!($> == 0),
# Date and time formats (see strftime(3))
DATE_FORMAT => '%Y-%m-%d', # POSIX::strftime(DATE_FORMAT, localtime($t))
TIME_FORMAT => '%H:%M:%S', # POSIX::strftime(TIME_FORMAT, localtime($t))
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Action/Retry/Strategy/Fibonacci.pm view on Meta::CPAN
with 'Action::Retry::Strategy';
with 'Action::Retry::Strategy::HelperRole::RetriesLimit';
with 'Action::Retry::Strategy::HelperRole::SleepTimeout';
has initial_term_index => (
is => 'ro',
lazy => 1,
lib/Action/Retry/Strategy/Fibonacci.pm view on Meta::CPAN
sub needs_to_retry { 1 }
# Inherited from Action::Retry::Strategy::HelperRole::RetriesLimit
# Inherited from Action::Retry::Strategy::HelperRole::SleepTimeout
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
share/apache2/conf/httpd.conf.tt view on Meta::CPAN
# identification number when it starts.
#
PidFile [% apache2.PidFile %]
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 120
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
share/apache2/conf/httpd.conf.tt view on Meta::CPAN
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15
##
## Server-Pool Size Regulation (MPM specific)
##
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
public/vendor/pagedown/Markdown.Editor.js view on Meta::CPAN
var undoObj = this;
var undoStack = []; // A stack of undo states
var stackPtr = 0; // The index of the current state
var mode = "none";
var lastState; // The last state
var timer; // The setTimeout handle for cancelling the timer
var inputStateObj;
// Set the mode for later logic steps.
var setMode = function (newMode, noSave) {
if (mode != newMode) {
public/vendor/pagedown/Markdown.Editor.js view on Meta::CPAN
saveState();
}
}
if (!uaSniffed.isIE || mode != "moving") {
timer = setTimeout(refreshState, 1);
}
else {
inputStateObj = null;
}
};
public/vendor/pagedown/Markdown.Editor.js view on Meta::CPAN
};
this.setCommandMode = function () {
mode = "command";
saveState();
timer = setTimeout(refreshState, 0);
};
this.canUndo = function () {
return stackPtr > 1;
};
public/vendor/pagedown/Markdown.Editor.js view on Meta::CPAN
elapsedTime = currTime - prevTime;
pushPreviewHtml(text);
};
// setTimeout is already used. Used as an event listener.
var applyTimeout = function () {
if (timeout) {
clearTimeout(timeout);
timeout = undefined;
}
if (startType !== "manual") {
public/vendor/pagedown/Markdown.Editor.js view on Meta::CPAN
}
if (delay > maxDelay) {
delay = maxDelay;
}
timeout = setTimeout(makePreviewHtml, delay);
}
};
var getScaleFactor = function (panel) {
if (panel.scrollHeight <= panel.clientHeight) {
public/vendor/pagedown/Markdown.Editor.js view on Meta::CPAN
if (requiresRefresh) {
oldInputText = "";
makePreviewHtml();
}
else {
applyTimeout();
}
};
this.processingTime = function () {
return elapsedTime;
public/vendor/pagedown/Markdown.Editor.js view on Meta::CPAN
}
var fullTop = position.getTop(panels.input) - getDocScrollTop();
if (uaSniffed.isIE) {
setTimeout(function () {
window.scrollBy(0, fullTop - emptyTop);
}, 0);
}
else {
window.scrollBy(0, fullTop - emptyTop);
}
};
var init = function () {
setupEvents(panels.input, applyTimeout);
makePreviewHtml();
if (panels.preview) {
panels.preview.scrollTop = 0;
}
public/vendor/pagedown/Markdown.Editor.js view on Meta::CPAN
};
// Why is this in a zero-length timeout?
// Is it working around a browser bug?
setTimeout(function () {
createDialog();
var defTextLen = defaultInputText.length;
if (input.selectionStart !== undefined) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bundle/Advent/Year2000.pm view on Meta::CPAN
Time::Local - L<pod|Time::Local>, L<http://www.perladvent.org/2000/05/>
Time::Object - L<pod|Time::Object>, L<http://www.perladvent.org/2000/06/>
Tie::Scalar::Timeout - L<pod|Tie::Scalar::Timeout>, L<http://www.perladvent.org/2000/07/>
Tie::HashDefaults - L<pod|Tie::HashDefaults>, L<http://www.perladvent.org/2000/08/>
Crypt::RC4 - L<pod|Crypt::RC4>, L<http://www.perladvent.org/2000/09/>
view all matches for this distribution
view release on metacpan or search on metacpan
builder/Affix/Builder.pm view on Meta::CPAN
next;
}
say "=" x 60;
say "Fuzzing: $target->{desc}";
say " Script: $target->{script}";
say " Iterations: $iters, Timeout: ${to}s";
say "=" x 60;
push @fuzz_scripts, $script->stringify;
}
if (@fuzz_scripts) {
local $ENV{FUZZ_MAX_ITER} = $iters;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Agent/TCLI/Transport/Test.pm view on Meta::CPAN
:All('timeout_counter');
=item timeout_retries
The number of times to retry the timeout. Increments are in 5 second blocks. Default is 6 or 30 seconds.
Timeout checks periodically to make sure we're still running requests. It begins the countdown when
all requests have been dispatched, so that we don't wait forever for something to complete. This is user adjustable.
B<timeout_retries> will only contain numeric values.
=cut
my @timeout_retries :Field
lib/Agent/TCLI/Transport/Test.pm view on Meta::CPAN
# Whatever's left in the queue is bigger than us little synchronous
# calls. Send it over to the big Dispatch.
$poe_kernel->post($self->alias, 'Dispatch', 1 );
}
# set running state for Timeout.
$self->running(1);
$poe_kernel->run;
}
lib/Agent/TCLI/Transport/Test.pm view on Meta::CPAN
Dispatch
SendChangeContext
SendRequest
PostResponse
Timeout
)],
],
);
$args->{'peers'} = [ Agent::TCLI::User->new({
lib/Agent/TCLI/Transport/Test.pm view on Meta::CPAN
}
return( );
}
=item Timeout
B<Timeout> is a POE event handler that makes sure that a test script completes
and no requests leave the system waiting too long for a response. It takes
an argument of the delay, in seconds, that it will wait until checking again.
=cut
sub Timeout {
my ($kernel, $self, $session, $delay, ) =
@_[KERNEL, OBJECT, SESSION, ARG0, ];
$self->Verbose($self->alias.":Timeout: {".$delay.
"} run(".$self->running.") dc(".$dispatch_counter[$$self].") dr(".
$dispatch_retries[$$self].") tc(".$timeout_counter[$$self].") tr".
$timeout_retries[$$self].") requests(".$self->depth_requests.") ");
# Is Dispatch done with the queue?
lib/Agent/TCLI/Transport/Test.pm view on Meta::CPAN
$kernel->yield('_shutdown');
return;
}
else
{
$kernel->delay( 'Timeout', $delay, $delay, );
$timeout_counter[$$self]++;
}
}
# Dispatch now taking care of requests still in queue and we'll just wait until
# it is done.
else
{
$kernel->delay( 'Timeout', $delay, $delay, );
}
}
=item GetControl ( id )
lib/Agent/TCLI/Transport/Test.pm view on Meta::CPAN
$self->timeout_counter(0);
# This will call timeout in 5 seconds
# So there is a 30 seconds delay from the sending of the last test
# before we stop by default.
$timeout_id[$$self] = $kernel->delay_set( 'Timeout', 5, 5 );
# well, tha above would be true if the kernel was running gung ho. But we're
# calling timeslices willy nilly until all requests are queued, so it turns out
# that Timeout gets called in every timeslice regardless of delay, but
# this is good because it is the one queud event that keeps everything
# from stopping.
# When debugging POE Event streams, this might help.
return('_start'.$self->alias);
view all matches for this distribution
view release on metacpan or search on metacpan
Agent/Transport/TCP.pm view on Meta::CPAN
my @msg = @{$args{Message}};
# open a new socket & send the data
my $con = new IO::Socket::INET(
Proto => 'tcp',
Timeout => 1,
PeerAddr => $addr,
Reuse => 1
) or return (); # use IO::Socket's $!
for( @msg ) { $con->send( $_ ) or return (); }
Agent/Transport/TCP.pm view on Meta::CPAN
}
sub accept {
my ($self, %args) = @_;
$self->{Server}->timeout($args{Timeout}) if $args{Timeout};
my $remote = $self->{Server}->accept() or return;
$remote->autoflush();
my $from = $remote->peerhost . ':' . $remote->peerport;
print "Connection from $from\n" if $Debug;
view all matches for this distribution