Skip Menu |

This queue is for tickets about the Parallel-Queue CPAN distribution.

Report information
The Basics
Id: 25919
Status: resolved
Priority: 0/
Queue: Parallel-Queue

People
Owner: Nobody in particular
Requestors: bdonlan [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: runqueue does not empty @queue parameter
The Parallel::Queue 0.04 POD suggests the following usage: use Parallel::Queue qw( runqueue verbose fork ); runqueue 4, @queue; die "Incomplete jobs" if @queue; However this does not work as expected: perl -e 'use Parallel::Queue qw(runqueue verbose fork); @queue = map { sub { return 0; } } (1,2,3); runqueue 4, @queue; print "\@queue = ", scalar @queue, "\n"' Forking initial 4 proc Executing: 12081 fork: 12081 Executing: 12082 fork: 12082 Executing: 12083 fork: 12083 Executing: 12084 @queue = 3 fork: 12084 Looping remainder of list... exit: 12081 (0) exit: 12082 (0) exit: 12083 (0) exit: 12084 (0) @queue = 3
Subject: Re: [rt.cpan.org #25919] runqueue does not empty @queue parameter
Date: Thu, 29 Mar 2007 15:23:14 -0400
To: bug-Parallel-Queue [...] rt.cpan.org
From: Steven Lembark <lembark [...] wrkhors.com>
Doc bug. I've updated the POD to: my @remaining = runqueue @tasks; ... if @remaining; i.e., you get back the list of unused items. This is intentional to avoid issues with blessed closures or for cases where the same jobs need to be re-run multiple times (the inital queue doesn't have to be re-generated each time). thanks for noticing. -- Steven Lembark 85-09 90th Street Workhorse Computing Woodhaven, NY 11421 lembark@wrkhors.com +1 888 359 3508
Shouldve closed it the last time around...