=head1 NAME AnyEvent::XSThreadPool - manage xs-level thread pools to do stuff asynchronously =head1 SYNOPSIS use AnyEvent::XSThreadPool; =head1 DESCRIPTION =over 4 =cut package AnyEvent::XSThreadPool; BEGIN { our $VERSION = 0.02; use XSLoader; XSLoader::load __PACKAGE__, $VERSION; } use AnyEvent; =item $pool = new AnyEvent::XSThreadPool =cut sub new { my ($class) = @_; my $self = bless [""], $class; my $poll_cb = _init $self->[0]; $self->[1] = AE::io $self->fileno, 0, $poll_cb; $self } sub DESTROY { &_destroy; } =item $pool->req (REQUEST_TYPE, [request-args], $callback) =item $fd = $pool->fileno =item $nreqs = $pool->nreqs =item $nready = $pool->nready =item $npending = $pool->npending =item $threadcount = $pool->nthreads =item $pool->max_poll_time ($seconds) =item $pool->max_poll_reqs ($maxreqs) =item $pool->idle_timeout ($seconds) =item $pool->max_idle ($threads) =item $pool->min_parallel ($nthreads) =item $pool->max_parallel ($nthreads) =back =head1 AUTHOR Marc Lehmann http://software.schmorp.de/pkg/AnyEvent-XSThreadPool.html =cut 1