view release on metacpan or search on metacpan
examples/tcp-server.perl view on Meta::CPAN
my ($offset, $rest) = (0, $ret);
while ($rest) {
my $wrote = syswrite($arg_handle, $buf, $rest, $offset);
# Nasty busy loop for rapid prototyping.
unless ($wrote) {
next if $! == EAGAIN or $! == EWOULDBLOCK;
warn "write error: $!";
$req_input_watcher = undef;
return;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/POE/Wheel/Spawner.pm view on Meta::CPAN
=cut
sub spawn {
my ($self, $pid) = @_;
my $filter = POE::Filter::Reference->new();
my $output = $filter->put([{ busy_worker_pid => $pid }]);
print @$output;
} ## end sub spawn
#=head2 _handle_start
lib/POE/Wheel/Spawner.pm view on Meta::CPAN
$kernel->sig_child($w->PID, "_sig_child");
} ## end sub _handle_start
#=head2 _handle_sig_child
#
#Clear heap. Trigger '_next' if !stop_if_done and currently no child is busy
#
#=cut
sub _handle_sig_child {
my ($self, $kernel, $heap, $pid, $exit_val)
lib/POE/Wheel/Spawner.pm view on Meta::CPAN
my $child = delete $heap->{worker_by_pid}{$pid};
unless ($child) {
POE::Kernel::_die("no child pid: $pid");
}
delete $heap->{busy_worker_pid}->{$pid};
if ($self->{stop_if_done}) {
($self->{_workers_sig_count} >= $self->{pool_size}) && return;
}
else {
(scalar(keys(%{ $heap->{busy_worker_pid} })))
|| $kernel->yield("_next");
}
} ## end sub _handle_sig_child
#=head2 _handle_done
lib/POE/Wheel/Spawner.pm view on Meta::CPAN
#=head2 _handle_stdout
#
#evaluate from child to stdout printed result.
#
#trigger _next event if child asks - by using busy_worker_pid printed to stdout - for a sibling
#
#=cut
sub _handle_stdout {
my ($self, $kernel, $heap, $result) = @_[OBJECT, KERNEL, HEAP, ARG0];
if (ref($result) eq 'HASH' && $result->{busy_worker_pid}) {
$heap->{busy_worker_pid}->{ $result->{busy_worker_pid} } = 1;
$kernel->yield("_next");
}
} ## end sub _handle_stdout
1; # End of POE::Wheel::Spawner
view all matches for this distribution
view release on metacpan or search on metacpan
runcap/install-sh view on Meta::CPAN
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd "$dst" 2>/dev/null ||
view all matches for this distribution
view release on metacpan or search on metacpan
Contributions via GitHub pull request are welcome.
Bug fixes in the form of pull requests or bug reports with
new (failing) unit tests have the best chance of being addressed
by busy maintainers, and are B<strongly> encouraged.
If you cannot provide a test or fix, or don't have time to do so,
then regular bug reports are still accepted and appreciated via the
GitHub bug tracker.
view all matches for this distribution
view release on metacpan or search on metacpan
PPresenter/Export/Website/HTML.pm view on Meta::CPAN
TEXT
, -bitmap => 'info'
, -buttons => [ 'OK', 'Cancel' ]
)->Show;
$show->busy(1);
my $dir = $export->{-outputDir};
-d $dir || mkdir $dir, 0755
or die "Cannot create directory $dir: $^E.\n";
PPresenter/Export/Website/HTML.pm view on Meta::CPAN
}
);
$export->makeMainPage($show, $export->slide2filename, \@mainlinks );
$show->busy(0);
$parent->Dialog
( -title => 'Ready'
, -text => 'The website is ready.'
, -bitmap => 'info'
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Padre/Plugin/HG.pm view on Meta::CPAN
sub vcs_execute
{
my ($self, $command, $dir) = @_;
print "Command $command\n";
my $busyCursor = Wx::BusyCursor->new();
my $result = capture_merged(sub{chdir($dir);system($command)});
if (!$result){$result = "Action Completed"}
$busyCursor = undef;
return $result;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Padre/Plugin/SVN.pm view on Meta::CPAN
sub svn_blame {
my ($self) = @_;
my $filename = _get_current_filename();
if ($filename) {
my $main = Padre::Current->main;
$self->{_busyCursor} = Wx::BusyCursor->new();
my $file = svn_file($filename);
$file->blame();
#my $blame = join( "\n", @{ $file->stdout } );
my @blame = @{ $file->stdout };
require Padre::Plugin::SVN::Wx::SVNDialog;
my $dialog = Padre::Plugin::SVN::Wx::SVNDialog->new( $main, $filename, \@blame, 'Blame' );
$self->{_busyCursor} = undef;
$dialog->Show(1);
return 1;
}
return;
lib/Padre/Plugin/SVN.pm view on Meta::CPAN
sub svn_log {
my ( $self, $path ) = @_;
my $main = Padre->ide->wx->main;
my $file = svn_file($path);
$self->{_busyCursor} = Wx::BusyCursor->new();
my $out = join( "\n", @{ $file->log() } );
$self->{_busyCursor} = undef;
#$main->message( $out, "$path" );
require Padre::Plugin::SVN::Wx::SVNDialog;
my $log = Padre::Plugin::SVN::Wx::SVNDialog->new( $main, $path, $out, 'Log' );
$log->Show(1);
lib/Padre/Plugin/SVN.pm view on Meta::CPAN
# whoops!! This isn't going to work "Commit message" is always set in the text control.
if ($message && $message ne 'Commit Message') { # "Commit Message" come from SVNDialog
$self->{_busyCursor} = Wx::BusyCursor->new();
my $revNo = $file->commit($message);
$self->{_busyCursor} = undef;
my @commit = @{ $file->stdout };
my @err = @{ $file->stderr };
if (@err) {
$main->error( join( "\n", @err ), Wx::gettext('Error - SVN Commit') );
lib/Padre/Plugin/SVN.pm view on Meta::CPAN
Wx::gettext("Commit warning"),
Wx::wxYES_NO | Wx::wxCENTRE,
$main,
);
if( $ret == Wx::wxYES ) {
$self->{_busyCursor} = Wx::BusyCursor->new();
my $revNo = $file->commit($message);
$self->{_busyCursor} = undef;
my @commit = @{ $file->stdout };
my @err = @{ $file->stderr };
if (@err) {
$main->error( join( "\n", @err ), 'Error - SVN Commit' );
view all matches for this distribution
view release on metacpan or search on metacpan
share/doc/wxwidgets.pod view on Meta::CPAN
=head2 Wx::BusyCursor::new
wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR)
Constructs a busy cursor object, calling wxBeginBusyCursor.
=head2 Wx::BusyCursor::DESTROY
~wxBusyCursor()
Destroys the busy cursor object, calling wxEndBusyCursor.
=head1 Wx::BusyInfo
=head2 Wx::BusyInfo::new
wxBusyInfo(const wxString& msg, wxWindow* parent = NULL)
Constructs a busy info window as child of parent and displays msg in
it.
NB: If parent is not NULL you must ensure that it is not closed while
the busy info is shown.
=head2 Wx::BusyInfo::DESTROY
~wxBusyInfo()
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Padre/Lock.pm view on Meta::CPAN
# Enable the locks
my $db = 0;
my $aui = 0;
my $config = 0;
my $busy = 0;
my $update = 0;
foreach (@_) {
if ( $_ ne uc $_ ) {
$locker->method_increment($_);
push @$self, 'method_decrement';
lib/Padre/Lock.pm view on Meta::CPAN
} elsif ( $_ eq 'AUI' ) {
$locker->aui_increment unless $aui;
$aui = 1;
} elsif ( $_ eq 'BUSY' ) {
$locker->busy_increment unless $busy;
$busy = 1;
} else {
Carp::croak("Unknown or unsupported special lock '$_'");
}
}
lib/Padre/Lock.pm view on Meta::CPAN
# becomes a problem, move the DB to first so actions appear to be
# slower, but the UI is immediately available once updated.
#
# Because configuration involves a database write, we always do it
# before we release the database lock.
push @$self, 'busy_decrement' if $busy;
push @$self, 'aui_decrement' if $aui;
push @$self, 'update_decrement' if $update;
push @$self, 'db_decrement' if $db;
push @$self, 'config_decrement' if $config;
view all matches for this distribution
view release on metacpan or search on metacpan
t/regression/29157.dd view on Meta::CPAN
'name' => '',
'phone' => '1003',
'device' => 'Treo 680',
'direction' => 'inbound',
'timestamp' => 1188899063,
'text' => 'Jon XXXX ere-Can u mail a link to any old 700mb torrent that i can upload to XXXX?Been too busy!Got 10 hrs!Gimme a call from www.orange.co.uk by 30200814254',
'type' => '0x400C',
'category' => 0,
'id' => 7107091,
'attributes' => {
'Dirty' => 1,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Parallel/DataPipe.pm view on Meta::CPAN
return unless $result;
return wantarray?@$result:$result;
}
sub run_pipes {
my ($prev_busy,$me,@next) = @_;
my $me_busy = $me->load_data || $me->busy_processors;
while ($me_busy) {
$me->receive_and_merge_data;
$me_busy = $me->load_data || $me->busy_processors;
my $next_busy = @next && run_pipes($prev_busy || $me_busy, @next);
$me_busy ||= $next_busy;
# get data from pipe if we have free_processors
return $me_busy if $prev_busy && $me->free_processors;
}
return 0;
}
# input_iterator is either array or subroutine reference which get's data from queue or other way and returns it
lib/Parallel/DataPipe.pm view on Meta::CPAN
sub load_data_processor {
my ($self,$data,$processor) = @_;
$processor->{item_number} = $self->{item_number}++;
die "no support of data processing for undef items!" unless defined($data);
$processor->{busy} = 1;
$self->_put_data($processor->{child_write},$data);
}
sub busy_processors {
my $self = shift;
return grep $_->{busy}, @{$self->{processors}};
}
sub free_processors {
my $self = shift;
return grep !$_->{busy}, @{$self->{processors}};
}
sub receive_and_merge_data {
my $self = shift;
my ($processors,$ready) = @{$self}{qw(processors ready)};
$self->{ready} = $ready = [] unless $ready;
@$ready = IO::Select->new(map $_->{busy} && $_->{parent_read},@$processors)->can_read() unless @$ready;
my $fh = shift(@$ready);
my $processor = first {$_->{parent_read} == $fh} @$processors;
local $_ = $self->_get_data($fh);
$processor->{busy} = undef; # make processor free
$self->output_iterator($_,$processor->{item_number});
}
sub _kill_data_processors {
my ($self) = @_;
lib/Parallel/DataPipe.pm view on Meta::CPAN
5) If it receives result from chidlren it sends processed data to C<data_merge> subroutine,
and starts loop 2) again.
6) loop 2) continues until input data is ended (end of C<input_iterator> array or C<input_iterator> sub returned undef).
7) In the end parent expects processed data from all busy chidlren and puts processed data to C<data_merge>
8) After having all the children sent processed data they are killed and run returns to the caller.
Note:
If C<input_iterator> or <process_data> returns reference, it serialize/deserialize data before/after pipe.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Parallel/Downloader.pm view on Meta::CPAN
Its goal is not to be better, faster, or smaller than anything else. Its goal is
to provide the user with a single function they can call with a bunch of HTTP
requests and which gives them the responses for them with as little fuss as
possible and most importantly, without downloading them in sequence.
It handles the busywork of grouping requests by hosts and limiting the amount of
simultaneous requests per host, separate from capping the amount of overall
connections. This allows the user to maximize their own connection without
abusing remote hosts.
Of course, there are facilities to customize the exact limits employed and to
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Parallel/Fork/BossWorkerAsync.pm view on Meta::CPAN
# all workers idle, and no partial jobs
# result_queue empty
if ($self->{shutting_down} &&
! @{ $self->{job_queue} } &&
! @{ $self->{result_queue} } ) {
my $busy=0;
my $partials = 0;
for my $s (keys(%$workers)) {
if ( ! $workers->{ $s }->{idle}) {
$busy ++;
last;
} elsif (exists($workers->{ $s }->{partial_job})) {
$partials ++;
last;
}
}
if ( ! $busy && ! $partials) {
# Close all workers
for my $s (keys(%$workers)) {
close($workers->{ $s }->{socket});
}
close($self->{app_socket});
view all matches for this distribution
view release on metacpan or search on metacpan
examples/dummyload.pl view on Meta::CPAN
my $start = time;
srand($$);
my $lifespan = 5+int(rand(10));
# Keep the CPU busy until it's time to exit
while (time - $start < $lifespan) {
my $a = time;
my $b = $a^time/3;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Parallel/ForkManager.pm view on Meta::CPAN
You can define a subroutine which is called when the child process needs to wait
for the startup. If $period is not defined, then one call is done per
child. If $period is defined, then $code is called periodically and the
module waits for $period seconds between the two calls. Note, $period can be
fractional number also. The exact "$period seconds" is not guaranteed,
signals can shorten and the process scheduler can make it longer (on busy
systems).
The $code called in the "start" and the "wait_all_children" method also.
No parameters are passed to the $code on the call.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Parallel/MPM/Prefork.pm view on Meta::CPAN
qw(
pf_init
pf_done
pf_whip_kids
pf_kid_new
pf_kid_busy
pf_kid_yell
pf_kid_idle
pf_kid_exit
);
lib/Parallel/MPM/Prefork.pm view on Meta::CPAN
my $child_sigh;
my $dhook_in_main;
my $dhook_pid;
my $num_busy;
my $num_idle;
my %busy;
my %idle;
my $sigset_bak = POSIX::SigSet->new();
my $sigset_all = POSIX::SigSet->new();
$sigset_all->fillset();
lib/Parallel/MPM/Prefork.pm view on Meta::CPAN
eval {
setpgrp();
$pgid = getpgrp();
$timeout = $am_parent = 1;
$dhook_pid = $done = $num_busy = $num_idle = 0;
$child_fds = $child_stat_fd = $child_data_fd = $error = '';
undef %busy;
undef %idle;
$debug = $opts{debug};
# Just like Apache, we allow start_servers to be larger than
lib/Parallel/MPM/Prefork.pm view on Meta::CPAN
}
return -1;
}
sub pf_kid_busy {
syswrite $parent_stat_fh, "R$$\n" if ! $am_parent;
}
sub pf_kid_idle {
syswrite $parent_stat_fh, "S$$\n" if ! $am_parent;
lib/Parallel/MPM/Prefork.pm view on Meta::CPAN
sub _spawn {
my $code = shift;
my $args = shift;
if ($num_idle + $num_busy >= $max_servers) {
warn "Server seems busy, consider increasing max_servers.\n";
_log_child_status();
return -1;
}
# Temporarily block signal delivery until child has installed all handlers
lib/Parallel/MPM/Prefork.pm view on Meta::CPAN
if ($pid == $dhook_pid) {
warn "ERROR: data_hook_helper exited, forking new one.\n";
$dhook_pid = _fork_data_hook_helper($parent_data_fh, $child_data_fh);
}
else {
delete $busy{$pid} and $num_busy--;
delete $idle{$pid} and $num_idle--;
warn "PID $pid exited.\n" if $debug;
}
$ct++;
}
lib/Parallel/MPM/Prefork.pm view on Meta::CPAN
sub _read_child_status {
sigprocmask(SIG_BLOCK, $sigset_all, $sigset_bak);
while (<$child_stat_fh>) {
my ($status, $pid) = unpack 'aA*';
# Ignore delayed status messages from no longer existing children
next unless $busy{$pid} or $idle{$pid};
if ($status eq 'R') {
delete $idle{$pid} and $num_idle--;
$busy{$pid}++ or $num_busy++;
}
elsif ($status eq 'S') {
delete $busy{$pid} and $num_busy--;
$idle{$pid}++ or $num_idle++;
}
elsif ($status ne '0') { # 0 = Jeffries tube. cg use only!
warn "ERROR: Dubious status: $_";
}
lib/Parallel/MPM/Prefork.pm view on Meta::CPAN
my ($what, $count, @more) = @_;
warn "$what $count child", $count == 1 ? ".\n" : "ren.\n", @more;
}
sub _log_child_status {
warn "busy:$num_busy idle:$num_idle\n";
}
1;
__END__
lib/Parallel/MPM/Prefork.pm view on Meta::CPAN
# A simple echo server.
sub echo_server {
my $sock = shift;
CONN: while (accept my $conn, $sock) {
pf_kid_busy(); # tell parent we're busy
/^quit/ ? last CONN : syswrite $conn, $_ while <$conn>;
pf_kid_yell({ foo => 'bar' }, 1); # send data to parent
pf_kid_idle(); # tell parent we're idle again
}
}
lib/Parallel/MPM/Prefork.pm view on Meta::CPAN
1 while pf_whip_kids(\&echo_server, [$SOCK]);
=head3 $code
Code reference to be called in the child processes. Must make sure it calls
pf_kid_busy() and pf_kid_idle() as needed. If it returns, the child will exit
via C<exit(0)>.
=head3 $args (optional)
Array reference holding arguments to be passed when $code is called (C<<
lib/Parallel/MPM/Prefork.pm view on Meta::CPAN
As a special case it always returns -1 immediately if pf_done() has already
been called.
The newly created child is considered idle by the parent. It should call
pf_kid_busy() as soon as it starts working and pf_kid_idle() when it is
available again so that the parent can arrange for enough available child
processes.
Typical code:
lib/Parallel/MPM/Prefork.pm view on Meta::CPAN
while (1) {
my $pid = pf_kid_new() // die "Could not fork: $!";
last if $pid < 0; # pf_done()
next if $pid; # parent
# child:
pf_kid_busy();
# do some rocket science
pf_kid_idle();
pf_kid_exit();
}
END {
pf_done();
}
=head2 pf_kid_busy ()
To be called by a child process to tell the main process it is busy.
=head2 pf_kid_idle ()
To be called by a child process to tell the main process it is idle.
lib/Parallel/MPM/Prefork.pm view on Meta::CPAN
=head2 Difference to Parallel::ForkManager
With Parallel::ForkManager, the main process decides in advance how much work
there is to do, how to split it up and how many child processes will work in
parallel. A child is always considered busy.
With Parallel::MPM::Prefork, the child processes take on work automatically as
it arrives. A child may be busy or idle. The main process only makes sure
there are always enough child processes available without too many idling
around.
Keep in mind that these are completely different use cases.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Parallel/MapReduce.pm view on Meta::CPAN
my @keys; # this will be filled in the map phase below
MAPPHASE:
while (my $sl4ws = _slices ([ keys %$slices ], $self->{_workers}) ) { # compute unresolved slices versus operational workers
if (my ($k) = keys %$slices) { # there is one unhandled
if (my ($w) = grep { ! defined $_->{thread} } # find a non-busy worker
@{ $self->{_workers}} ) { # from the operational workers
#warn "found free ".$w->{host};
$w->{slice} = delete $slices->{$k}; # task it with slice, take it off the list for now
my @chunks = threads->create ({'context' => 'list'},
'chunk_n_store',
lib/Parallel/MapReduce.pm view on Meta::CPAN
my @chunks;
REDUCEPHASE:
while (my $rs4ws = _slices ([ keys %$Rs ], $self->{_workers}) ) {
if (my ($r) = keys %$Rs) {
if (my ($w) = grep { ! defined $_->{thread} } # find a non-busy worker
@{ $self->{_workers}} ) { # from the operational workers
#warn "reduce: found free ".$w->{host};
$w->{slice} = delete $Rs->{$r};
$w->{thread} = threads->create (ref ($w).'::reduce',
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-process-count.t view on Meta::CPAN
sub WorkHandler {
my ( $Self, $Thing ) = @_;
my $Val = $Thing->{'Value'};
$Self->ProgressCallback( 'Log', "WorkHandler:ProgressCallback:$PID" );
# sleep such that this process is busy resulting in more even
# spread across the available children during the test.
sleep 1;
return "WorkHandler:Return:$PID";
}
view all matches for this distribution
view release on metacpan or search on metacpan
Scheduler.pm view on Meta::CPAN
my $FREEHOSTS = scalar(@CONF);
my %HOSTS;
my @TID;
my %TIDcmd;
# Map host id to hostname and set busy flag to zero
foreach my $node (@CONF) {
my $hostid = $node->{'hi_tid'};
$HOSTS{$hostid}{'name'} = $node->{'hi_name'};
$HOSTS{$hostid}{'busy'} = 0;
}
my $self = {CONF => \@CONF, FREEHOSTS => $FREEHOSTS, HOSTS => \%HOSTS, TID => \@TID, TIDCMD => \%TIDcmd};
bless $self;
return $self;
Scheduler.pm view on Meta::CPAN
foreach my $node (@$CONF_ref) {
my $hostid = $node->{'hi_tid'};
my $hostname = $node->{'hi_name'};
if ($HOSTS_ref->{$hostid}{'busy'} != 0) {
print STDERR "$hostname is not free\n";
}
}
}
}
Scheduler.pm view on Meta::CPAN
# Locate a free host, allocate it, return it.
# First available algorithm
foreach my $hostid (keys %$HOSTS_ref) {
if ($HOSTS_ref->{$hostid}{'busy'} == 0) {
my $hostname = $HOSTS_ref->{$hostid}{'name'};
print STDERR "Allocating host $hostname\n";
$HOSTS_ref->{$hostid}{'busy'} = 1;
$self->{FREEHOSTS}--;
return $hostname;
}
}
Scheduler.pm view on Meta::CPAN
sub _deallocateHost {
my ($self, $hostid) = @_;
my $HOSTS_ref = $self->{HOSTS};
if ($HOSTS_ref->{$hostid}{'busy'} == 0) {
die "Host not allocated: ". $HOSTS_ref->{$hostid}{'name'} ."!\n";
}
print STDERR "Deallocating host ". $HOSTS_ref->{$hostid}{'name'} ."\n";
$HOSTS_ref->{$hostid}{'busy'} = 0;
$self->{FREEHOSTS}++;
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Parallel/TaskExecutor.pm view on Meta::CPAN
=back
=cut
Readonly::Scalar my $busy_loop_wait_time_us => 1000;
sub run {
my ($this, $sub, %options) = @_;
%options = (%{$this->{options}}, %options);
# TODO: add an option to always call _remove_done_tasks here, to cleanup.
while (!$options{forced} && $this->{current_tasks} >= $this->{max_parallel_tasks}) {
$this->_remove_done_tasks();
usleep($busy_loop_wait_time_us);
}
return $this->_fork_and_run($sub, %options);
}
=pod
view all matches for this distribution
view release on metacpan or search on metacpan
lib/LWP/Parallel/RobotUA.pm view on Meta::CPAN
my($failed_connections, $remember_failures, $ordpend_connections, $rules) =
@{$self}{qw(failed_connections remember_failures
ordpend_connections rules)};
my ($entry, @queue, %busy);
# get first entry from pending connections
while ( $entry = shift @$ordpend_connections ) {
my $request = $entry->request;
my $netloc = eval { local $SIG{__DIE__}; $request->url->host_port; };
lib/LWP/Parallel/RobotUA.pm view on Meta::CPAN
# simulate immediate response from server
$self->on_failure ($entry->request, $response, $entry);
next;
}
push (@queue, $entry), next if $busy{$netloc};
# Do we try to access a new server?
my $allowed = $rules->allowed($request->url);
# PS: pending Robots.txt requests are always allowed! (hopefully)
if ($allowed < 0) {
LWP::Debug::debug("Host not visited before, or robots.".
"txt expired: ($allowed) ".$request->url);
my $checking = $self->_checking_robots_txt ($netloc);
# let's see if we're already busy checkin' this host
if ( $checking > 0 ) {
LWP::Debug::debug("Already busy checking here. Request queued");
push (@queue, $entry);
} elsif ( $checking < 0 ) {
# We already checked here. Seems the robots.txt
# expired afterall. Pretend we're allowed
LWP::Debug::debug("Checked this host before. robots.txt".
lib/LWP/Parallel/RobotUA.pm view on Meta::CPAN
$rules->parse($robot_url, "", $fresh_until);
}
},
};
# immediately try to connect (if bandwith available)
push (@queue, $robot_entry), $busy{$netloc}++
unless $self->_check_bandwith($robot_entry);
# mark this host as being checked
$self->_checking_robots_txt ($netloc, 1);
# don't forget to queue the entry that triggered this request
push (@queue, $entry);
lib/LWP/Parallel/RobotUA.pm view on Meta::CPAN
# requests to this server, but have finally waited
# long enough when the x+1 request comes off the
# queue, and then we would connect to the x+1
# request before any of the first x requests
# (which is not what we want!)
$busy{$netloc}++;
} else {
LWP::Debug::debug("'use_sleep' disabled, generating response");
my $res = new HTTP::Response
&HTTP::Status::RC_SERVICE_UNAVAILABLE, 'Please, slow down';
$res->header('Retry-After', time2str(time + $wait));
lib/LWP/Parallel/RobotUA.pm view on Meta::CPAN
} else { # check bandwith
unless ( $self->_check_bandwith($entry) ) {
# if _check_bandwith returns a value, it means that
# no bandwith is available: push $entry on queue
push (@queue, $entry);
$busy{$netloc}++;
} else {
$rules->visit($netloc);
}
}
}
lib/LWP/Parallel/RobotUA.pm view on Meta::CPAN
if ($allowed < 0) {
LWP::Debug::debug("Host not visited before, or robots.".
"txt expired: ".$request->url);
my $checking = $self->_checking_robots_txt
($request->url->host_port);
# let's see if we're already busy checkin' this host
if ( $checking > 0 ) {
# if so, don't register yet another robots.txt request!
LWP::Debug::debug("Already busy checking here. ".
"Request queued");
unshift (@$queue, $entry);
next SERVER;
} elsif ( $checking < 0 ) {
# We already checked here. Seems the robots.txt
view all matches for this distribution
view release on metacpan or search on metacpan
root/static/yui/assets/skins/sam/editor.css view on Meta::CPAN
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
.yui-busy{cursor:wait!important;}.yui-toolbar-container fieldset,.yui-editor-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-...
.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0;text-indent:0;font-size:75%;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-to...
.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-w...
.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-t...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Parse/CPAN/Perms.pm view on Meta::CPAN
=head2 Internet Relay Chat
You can get live help by using IRC ( Internet Relay Chat ). If you don't know what IRC is,
please read this excellent guide: L<http://en.wikipedia.org/wiki/Internet_Relay_Chat>. Please
be courteous and patient when talking to us, as we might be busy or sleeping! You can join
those networks/channels and get help:
=over 4
=item *
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Parse/CSV/Colnames.pm view on Meta::CPAN
=pod
=head1 Fixed METHODS
These methods have not work in the parent module L<Parse::CSV> yet, because Adam Kennedy is very busy.
=head2 combine
$status = $csv->combine(@columns);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Parse/IASLog.pm view on Meta::CPAN
'19' => 'calledPartyReject',
'20' => 'blocked',
'21' => 'analogBlocked',
'22' => 'digitalBlocked',
'23' => 'outOfService',
'24' => 'busy',
'25' => 'congestion',
'26' => 'protocolError',
'27' => 'noFreeBchannel',
'28' => 'inOutCallCollision',
'29' => 'inCallArrival',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Parse/NetApp/ASUP.pm view on Meta::CPAN
$voloptions .= $3;
} elsif ( $line =~ /^(\s{27,30}\s*|\t{5})(.*)$/ ) { # v7 and earlier
$voloptions .= $2;
} elsif ( $line =~ /^\s*(\w+=[\w\(\)]+,?)$/ ) { # v8
$voloptions .= $1;
} elsif ( $line =~ /^vol status: Volume '(.*?)' is temporarily busy \(snapmirror destination\)/ ) {
$volname = $1;
$volstate = 'busy';
} elsif ( $line =~ /Containing aggregate: ('[\w\-]+'|<N\/A>)/ ) {
$volaggr = $1;
$volaggr = $1 if $volaggr =~ /^'(.+)'$/;
} else {
Carp::croak "Bad Vol Status Line: [$line]\n";
lib/Parse/NetApp/ASUP.pm view on Meta::CPAN
$volinfo{options} = $voloptions;
$volinfo{aggregate} = $volaggr;
$volinfo{notes} = '';
$volinfo{notes} = 'Volume is offline' if $volstate eq 'offline';
$volinfo{notes} = 'Volume is busy' if $volstate eq 'busy';
push(@Parse::NetApp::ASUP::concerns, "$volname is marked as $volstate") if $volstate eq 'offline' or $volstate eq 'busy';
return ( $volname, \%volinfo );
}
=head3 parse_xheader()
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Parse/Path.pm view on Meta::CPAN
=head2 Internet Relay Chat
You can get live help by using IRC ( Internet Relay Chat ). If you don't know what IRC is,
please read this excellent guide: L<http://en.wikipedia.org/wiki/Internet_Relay_Chat>. Please
be courteous and patient when talking to us, as we might be busy or sleeping! You can join
those networks/channels and get help:
=over 4
=item *
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Paws/Batch/RegisterJobDefinition.pm view on Meta::CPAN
# To register a job definition
# This example registers a job definition for a simple container job.
my $RegisterJobDefinitionResponse = $batch->RegisterJobDefinition(
'ContainerProperties' => {
'Command' => [ 'sleep', 10 ],
'Image' => 'busybox',
'Memory' => 128,
'Vcpus' => 1
},
'JobDefinitionName' => 'sleep10',
'Type' => 'container'
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PawsX/DynamoDB/DocumentClient.pm view on Meta::CPAN
},
);
=head1 DESCRIPTION
Paws (in this author's opinion) is the best and most up-to-date way of working with AWS. However, reading and writing DynamoDB items via Paws' low-level API calls can involve a lot of busy work formatting your data structures to include DynamoDB type...
This module simplifies some DynamoDB operations by automatically converting back and forth between simpler Perl data structures and the request/response data structures used by Paws.
For more information about how types are mananged, see L<Net::Amazon::DynamoDB::Marshaler>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pcore/Handle/pgsql/DBH.pm view on Meta::CPAN
return;
}
sub _execute ( $self, $query, $bind, $cb, %args ) {
if ( $self->{state} != $STATE_READY ) {
warn 'DBI: DBH is busy';
$cb->( undef, res [ 500, 'DBH is busy' ] );
return;
}
$self->{state} = $STATE_BUSY;
view all matches for this distribution