diff options
author | gregor herrmann <gregoa@debian.org> | 2020-06-21 16:57:41 +0200 |
---|---|---|
committer | gregor herrmann <gregoa@debian.org> | 2020-06-21 16:57:41 +0200 |
commit | ddced8c9e32c256f98e6670f6838f3991bb35e44 (patch) | |
tree | 1ba26f99dda1a3432e548b9b05177d8db0a875f3 /t/05_mce_stream.t | |
parent | a3e9e0bb0df12b7961cf6c2f99bec86f47add67e (diff) |
New upstream version 1.872
Diffstat (limited to 't/05_mce_stream.t')
-rw-r--r-- | t/05_mce_stream.t | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/t/05_mce_stream.t b/t/05_mce_stream.t index a62252d..0034358 100644 --- a/t/05_mce_stream.t +++ b/t/05_mce_stream.t @@ -26,10 +26,10 @@ my $answers = '6 12 18 24 30 36 42 48 54'; my $ans_mix = '18 36 54'; my @a; -MCE::Stream::init { +MCE::Stream->init( max_workers => [ 2 , 2 ], # run with 2 workers for both sub-tasks task_name => [ 'b' , 'a' ] -}; +); sub _task_a { chomp; $_ * 2 } sub _task_b { $_ * 3 } @@ -72,7 +72,7 @@ is( join(' ', @a), $answers, 'stream \@a: check results for glob' ); mce_stream_s \@a, \&_task_b, \&_task_a, 1, 9; is( join(' ', @a), $answers, 'stream \@a: check results for sequence' ); -MCE::Stream::finish; +MCE::Stream->finish; @a = mce_stream { mode => 'map', code => sub { $_ * 2 * 3 } }, @@ -81,7 +81,7 @@ MCE::Stream::finish; is( join(' ', @a), $ans_mix, 'check results for mix_mode' ); -MCE::Stream::finish; +MCE::Stream->finish; ## cleanup |