AnyEvent-Task

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

  * Remove undocumented "sk" protocol feature
  * Big test-suite refactor/improvements
  * Lots more/better docs, including for error handling/logging

0.700   2013-02-27
  * 2 tests were missing from manifest
  * License and github meta info
  * Diagnostics and timeout bump in test to debug some
    cpan-tester environments
  * Remove MYMETA files from distribution
  * Bugfix: Worker was using default JSON::XS settings instead
    of utf-8 mode
  * Add unicode test
  * Document error handling with Callback::Frame
  * Remove scary "the api might change" warning. I think we're
    pretty much stable now
  * Misc doc edits

0.602   2012-12-13
  * Exceptions in setup callback are now propagated to client
  * Minor doc updates (more coming)

META.json  view on Meta::CPAN

      "configure" : {
         "requires" : {
            "ExtUtils::MakeMaker" : "0"
         }
      },
      "runtime" : {
         "requires" : {
            "AnyEvent" : "0",
            "Callback::Frame" : "0",
            "Guard" : "0",
            "JSON::XS" : "0",
            "Log::Defer" : "0.300",
            "common::sense" : "0"
         }
      }
   },
   "release_status" : "stable",
   "resources" : {
      "bugtracker" : {
         "web" : "https://github.com/hoytech/AnyEvent-Task/issues"
      },

META.yml  view on Meta::CPAN

  version: '1.4'
name: AnyEvent-Task
no_index:
  directory:
    - t
    - inc
requires:
  AnyEvent: '0'
  Callback::Frame: '0'
  Guard: '0'
  JSON::XS: '0'
  Log::Defer: '0.300'
  common::sense: '0'
resources:
  bugtracker: https://github.com/hoytech/AnyEvent-Task/issues
  repository: git://github.com/hoytech/AnyEvent-Task.git
version: '0.805'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

Makefile.PL  view on Meta::CPAN



my %args = (
  NAME => 'AnyEvent::Task',
  VERSION_FROM => 'lib/AnyEvent/Task.pm',
  LIBS => [''],
  INC => '-I lib/',
  PREREQ_PM => {
    'common::sense' => 0,
    'AnyEvent' => 0,
    'JSON::XS' => 0,
    'Guard' => 0,
    'Callback::Frame' => 0,
    'Log::Defer' => '0.300',
  },
  LICENSE => 'perl',
  dist => {
    PREOP => 'pod2text $(VERSION_FROM) > $(DISTVNAME)/README',
  },
);

lib/AnyEvent/Task/Server/Worker.pm  view on Meta::CPAN

package AnyEvent::Task::Server::Worker;

use common::sense;

use AnyEvent::Util;
use Guard;

use POSIX; ## POSIX::_exit is used so we don't unlink the unix socket file created by our parent before the fork
use IO::Select;
use JSON::XS;
use Scalar::Util qw/blessed/;


my $setup_has_been_run;
my $json;
my $sel;



sub handle_worker {

lib/AnyEvent/Task/Server/Worker.pm  view on Meta::CPAN

  POSIX::_exit(1);
}


sub handle_worker_wrapped {
  my ($server, $fh, $monitor_fh) = @_;

  AnyEvent::Util::fh_nonblocking $fh, 0;
  AnyEvent::Util::fh_nonblocking $monitor_fh, 0;

  $json = JSON::XS->new->utf8;

  $sel = IO::Select->new;
  $sel->add($fh, $monitor_fh);

  while(1) {
    my @all_ready = $sel->can_read;

    foreach my $ready (@all_ready) {
      if ($ready == $monitor_fh) {
        ## Lost connection to server



( run in 0.880 second using v1.01-cache-2.11-cpan-4d50c553e7e )