Filewatcher File Search File Search
Content Search
» » » » » »


Group of threads for performing similar jobs

The Thread::Pool allows you to set up a group of (worker) threads to execute a (large) number of similar jobs that need to be executed asynchronously. The routine that actually performs the job (the "do" routine), must be specified as a name or a reference to a (anonymous) subroutine.

This module only functions on Perl versions 5.8.0 and later. And then only when threads are enabled with -Dusethreads. It is of no use with any version of Perl before 5.8.0 or without threads enabled.

Package version:0.32


README for Thread::Pool

Create a group of threads to perform similar jobs, without having to start
and stop a thread for each job.  It is intended to be used in situations
where the completion of similar jobs (e.g. fetching URL's or resolving
reverse DNS of IP-numbers) may take an indeterminate amount of time.
Using a pool of threads, these jobs can be executed more or less
simultaneously, causin


Thread::Pool(3)  User Contributed Perl Documentation Thread::Pool(3)

       Thread::Pool - group of threads for performing similar jobs

        use Thread::Pool;
        $pool = Thread::Pool->new(
          optimize => 'cpu', # default: 'memory'

          pre => sub {shift; print "starting worker with @_\n",
          do => sub {shift; print "doing job for @_\n"; reve


0.32	28 December 2003
	Added automatic required modules update using Devel::Required.

0.31	17 November 2003
	Added method "result_any" to fetch _any_ result, optionally setting
	the jobid as well. After a suggestion by Matthew Kirkwood.

0.30	9 November 2003
	Increased dependency on Thread::Conveyor to 0.15 because of problem
	fix for 5.8.2.

	3 October 2003
	Found still one reference to original


Check all the signalling going on and see whether they still make sense with
what I now know about c

Browse inside perl-Thread-Pool-0.32-1.el5.rf.noarch.rpm

1.11 KB2014-11-29HEADER  view  114 mirrors
         [DIR]usr/ (2)  65535+ mirrors

Download perl-Thread-Pool-0.32-1.el5.rf.noarch.rpm

Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017