Skip to content

Commit

Permalink
Remove a now unnecssary argument
Browse files Browse the repository at this point in the history
Still left over from when &racify was an actual thing
  • Loading branch information
lizmat committed Jun 1, 2024
1 parent 8b86ed2 commit a0a9064
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Revision history for ParaSeq
- Updated status of ".produce" and added tests
- Updated status of ".slice" and added tests
- Updated status of ".snip" and added tests
- Updated status of ".skip" and added more tests

0.0.7 2024-05-30T14:24:50+02:00
- Added optimized ".batch" and tests
Expand Down
20 changes: 9 additions & 11 deletions lib/ParaSeq.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -454,18 +454,19 @@ class ParaSeq does Sequence {

# Do error checking and set up object if all ok
method !setup(
str $method,
uint $batch,
uint $auto,
uint $degree,
uint $stop-after,
$buffer is raw,
$source
) is hidden-from-backtrace {
X::Invalid::Value.new(:$method, :name<batch>, :value($batch)).throw
if $batch <= 0;
X::Invalid::Value.new(:$method, :name<degree>, :value($degree)).throw
if $degree <= 1;
X::Invalid::Value.new(
:method<hyperize>, :name<batch>, :value($batch)
).throw if $batch <= 0;
X::Invalid::Value.new(
:method<hyperize>, :name<degree>, :value($degree)
).throw if $degree <= 1;

# Set it up!
my $self := nqp::create(self);
Expand Down Expand Up @@ -632,8 +633,7 @@ class ParaSeq does Sequence {
uint $initial,
uint $auto,
uint $degree,
uint $stop-after,
str $method
uint $stop-after
) is implementation-detail {
my $iterator := $source.iterator;
my $buffer := nqp::create(IB);
Expand All @@ -643,7 +643,7 @@ class ParaSeq does Sequence {
?? $buffer.Seq
# Need to actually parallelize, set up ParaSeq object
!! self!setup(
$method, $initial, $auto, $degree, $stop-after,
$initial, $auto, $degree, $stop-after,
$buffer, $iterator
)
}
Expand Down Expand Up @@ -1677,7 +1677,6 @@ multi sub hyperize(
$auto,
($degree // $default-degree).Int,
$stop-after == Inf ?? 0 !! $stop-after,
'hyperize'
)
}
multi sub hyperize(
Expand All @@ -1694,8 +1693,7 @@ multi sub hyperize(
($batch // $default-batch).Int,
$auto,
($degree // $default-degree).Int,
$stop-after == Inf ?? 0 !! $stop-after,
'hyperize'
$stop-after == Inf ?? 0 !! $stop-after
)
!! $list
}
Expand Down

0 comments on commit a0a9064

Please sign in to comment.