Index index by Group index by Distribution index by Vendor index by creation date index by Name Mirrors Help Search

perl-Parallel-ForkManager-2.02-bp156.2.1 RPM for noarch

From OpenSuSE Leap 15.6 for noarch

Name: perl-Parallel-ForkManager Distribution: SUSE Linux Enterprise 15 SP6
Version: 2.02 Vendor: openSUSE
Release: bp156.2.1 Build date: Sat Jul 22 11:55:56 2023
Group: Development/Libraries/Perl Build host: goat17
Size: 88660 Source RPM: perl-Parallel-ForkManager-2.02-bp156.2.1.src.rpm
Packager: https://bugs.opensuse.org
Url: https://metacpan.org/release/Parallel-ForkManager
Summary: Simple Parallel Processing Fork Manager
This module is intended for use in operations that can be done in parallel
where the number of processes to be forked off should be limited. Typical
use is a downloader which will be retrieving hundreds/thousands of files.

The code for a downloader would look something like this:

  use LWP::Simple;
  use Parallel::ForkManager;

  ...

  my @links=(
    ["http://www.foo.bar/rulez.data","rulez_data.txt"],
    ["http://new.host/more_data.doc","more_data.doc"],
    ...
  );

  ...

  
  my $pm = Parallel::ForkManager->new(30);

  LINKS:
  foreach my $linkarray (@links) {
    $pm->start and next LINKS; # do the fork

    my ($link, $fn) = @$linkarray;
    warn "Cannot get $fn from $link"
      if getstore($link, $fn) != RC_OK;

    $pm->finish; # do the exit in the child process
  }
  $pm->wait_all_children;

First you need to instantiate the ForkManager with the "new" constructor.
You must specify the maximum number of processes to be created. If you
specify 0, then NO fork will be done; this is good for debugging purposes.

Next, use $pm->start to do the fork. $pm returns 0 for the child process,
and child pid for the parent process (see also perlfunc(1p)/fork()). The
"and next" skips the internal loop in the parent process. NOTE: $pm->start
dies if the fork fails.

$pm->finish terminates the child process (assuming a fork was done in the
"start").

NOTE: You cannot use $pm->start if you are already in the child process. If
you want to manage another set of subprocesses in the child process, you
must instantiate another Parallel::ForkManager object!

Provides

Requires

License

Artistic-1.0 OR GPL-1.0-or-later

Changelog

* Thu Nov 08 2018 Stephan Kulow <coolo@suse.com>
  - updated to 2.02
    see /usr/share/doc/packages/perl-Parallel-ForkManager/Changes
    2.02 2018-10-08
    - Promote to stable release.
    2.01 2018-08-23
      [ ENHANCEMENTS ]
    - add 'child_role' attribute for customization.
    2.00 2018-08-22 (TRIAL)
      [ API CHANGES ]
    - Change the guts to be Moo-based. (GH#24)
* Thu Jul 19 2018 coolo@suse.com
  - updated to 1.20
    see /usr/share/doc/packages/perl-Parallel-ForkManager/Changes
    1.20 2018-07-18
      [ DOCUMENTATION ]
    - Add section about rand() and forked processes. (GH#22)
      [ ENHANCEMENTS ]
    - Expand abbreviations in error messages. (GH#14, Ricardo Signes)
    - Rename variables and simplify `_waitpid` signature. (GH#14, Ricardo
      Signes)
      [ STATISTICS ]
    - code churn: 6 files changed, 80 insertions(+), 33 deletions(-)
* Mon Jul 04 2016 coolo@suse.com
  - updated to 1.19
    see /usr/share/doc/packages/perl-Parallel-ForkManager/Changes
    1.19 2016-06-28
      [ DOCUMENTATION ]
    - Typo fixes. (GH#10)
    - Add short discussion on security about the information passing via
      files between master/children processes.
    - Document the problem between PerlIO::fzip and fork(). (GH#11)
      [ ENHANCEMENTS ]
    - New way to spawn workers via 'start_child'.
      [ STATISTICS ]
    - code churn: 4 files changed, 114 insertions(+), 5 deletions(-)
* Mon Apr 04 2016 coolo@suse.com
  - updated to 1.18
    see /usr/share/doc/packages/perl-Parallel-ForkManager/Changes
    1.18 2016-03-29
      [ BUG FIXES ]
    - Storage file between child and parent could have the wrong name,
      because $$ was used instead of parent_pid. (GH#9, reported by Lucien
      Coffe)
      [ STATISTICS ]
    - code churn: 4 files changed, 37 insertions(+), 4 deletions(-)
* Sun Nov 29 2015 coolo@suse.com
  - updated to 1.17
    see /usr/share/doc/packages/perl-Parallel-ForkManager/Changes
    1.17 2015-11-28
    - Up Test::More's dependency version to v0.94 (because of 'subtest').
      (GH#8, mauke)
      [ STATISTICS ]
    - code churn: 3 files changed, 88 insertions(+), 70 deletions(-)
* Sat Oct 10 2015 coolo@suse.com
  - updated to 1.16
    see /usr/share/doc/packages/perl-Parallel-ForkManager/Changes
* Sun Jul 12 2015 coolo@suse.com
  - updated to 1.15
    see /usr/share/doc/packages/perl-Parallel-ForkManager/Changes
    1.15 2015.07.08
    - test's watchdog actually exit if it's being hit. (RT#105747, Zefram)
    - condition to catch children reaped by external forces
      improved. (RT#105748, Zefram + Yanick)
* Mon May 18 2015 coolo@suse.com
  - updated to 1.14
    see /usr/share/doc/packages/perl-Parallel-ForkManager/Changes
    1.14 2015.05.17
    - Add 'reap_finished_children', 'is_child' and 'is_parent'. (GH#6, Nine bit)
* Wed May 13 2015 coolo@suse.com
  - updated to 1.13
    see /usr/share/doc/packages/perl-Parallel-ForkManager/Changes
    1.13 2015.05.11
    - Use 'select' instead of sleep in _waitpid_blocking. (GH#5)
* Mon Mar 23 2015 mpluskal@suse.com
  - Update to 1.12
    * for full list of changes see attaced Changes

Files

/usr/lib/perl5/vendor_perl/5.26.1/Parallel
/usr/lib/perl5/vendor_perl/5.26.1/Parallel/ForkManager
/usr/lib/perl5/vendor_perl/5.26.1/Parallel/ForkManager.pm
/usr/lib/perl5/vendor_perl/5.26.1/Parallel/ForkManager/Child.pm
/usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
/usr/share/doc/packages/perl-Parallel-ForkManager
/usr/share/doc/packages/perl-Parallel-ForkManager/CODE_OF_CONDUCT.md
/usr/share/doc/packages/perl-Parallel-ForkManager/CONTRIBUTORS
/usr/share/doc/packages/perl-Parallel-ForkManager/Changes
/usr/share/doc/packages/perl-Parallel-ForkManager/README.mkdn
/usr/share/doc/packages/perl-Parallel-ForkManager/doap.xml
/usr/share/doc/packages/perl-Parallel-ForkManager/examples
/usr/share/doc/packages/perl-Parallel-ForkManager/examples/callback.pl
/usr/share/doc/packages/perl-Parallel-ForkManager/examples/callback_data.pl
/usr/share/doc/packages/perl-Parallel-ForkManager/examples/parallel_get.pl
/usr/share/man/man3/Parallel::ForkManager.3pm.gz
/usr/share/man/man3/Parallel::ForkManager::Child.3pm.gz


Generated by rpm2html 1.8.1

Fabrice Bellet, Fri Apr 26 23:30:45 2024