mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-22 20:57:53 +00:00
parallel: --xapply now recycles arguments if an input source has more arguments than others.
This commit is contained in:
parent
f30a852c47
commit
301709bde9
|
@ -193,17 +193,8 @@ release should be considered beta quality.
|
|||
|
||||
New in this release:
|
||||
|
||||
* --ctrlc is now default if --pipe is not used; thus making it
|
||||
possible to kill remotely started jobs simply by pressing Ctrl-C.
|
||||
|
||||
* --timeout 200% now means kill jobs that take more than twice the
|
||||
time of the median run time of a job.
|
||||
|
||||
* Jobs are now distributed round robin when having mulitiple
|
||||
--sshlogin instead of filling up one --sshlogin at a time.
|
||||
|
||||
* niceload: darwin version of --io --mem --swap. Thanks to Anders F
|
||||
Björklund.
|
||||
* Developer job asking for GNU Parallel expertise:
|
||||
http://careers.stackoverflow.com/jobs/35562/developer-big-data-geo-and-web-climate-central
|
||||
|
||||
* Bug fixes and man page updates.
|
||||
|
||||
|
|
|
@ -641,7 +641,7 @@ sub get_options_from_array {
|
|||
sub parse_options {
|
||||
# Returns: N/A
|
||||
# Defaults:
|
||||
$Global::version = 20130522;
|
||||
$Global::version = 20130606;
|
||||
$Global::progname = 'parallel';
|
||||
$Global::infinity = 2**31;
|
||||
$Global::debug = 0;
|
||||
|
@ -5311,11 +5311,16 @@ sub xapply_get {
|
|||
my $empty = 1;
|
||||
for my $fh (@{$self->{'fhs'}}) {
|
||||
my $arg = read_arg_from_fh($fh);
|
||||
# Record $arg for recycling at end of file
|
||||
push @{$self->{'arg_matrix'}{$fh}}, $arg;
|
||||
if(defined $arg) {
|
||||
push @record, $arg;
|
||||
$empty = 0;
|
||||
} else {
|
||||
push @record, Arg->new("");
|
||||
# End of file: Recycle arguments
|
||||
push @{$self->{'arg_matrix'}{$fh}}, shift @{$self->{'arg_matrix'}{$fh}};
|
||||
# return last @{$args->{'args'}{$fh}};
|
||||
push @record, @{$self->{'arg_matrix'}{$fh}}[-1];
|
||||
}
|
||||
}
|
||||
if($empty) {
|
||||
|
|
Loading…
Reference in a new issue