On Mon Aug 01 20:51:12 2016, jdv79 wrote:
> [jdv@wieldy ~]$ cat test_n_threads.p6
> use v6;
> 
> await map { start {
>      my $foo = "barbaz";
>      $foo ~~ s/.+/{ <a b c>.roll($/.chars).join }/;
> } }, ^100;
> [jdv@wieldy ~]$ perl6 test_n_threads.p6
> Use of Nil in string context  in block  at test_n_threads.p6 line 5
> Use of Nil in string context  in block  at test_n_threads.p6 line 5
> [jdv@wieldy ~]$ perl6 test_n_threads.p6
> Use of Nil in string contextUse of Nil in string contextUse of Nil in 
> string context  in block  at test_n_threads.p6 line 5
>    in block  at test_n_threads.p6 line 5
>    in block  at test_n_threads.p6 line 5
> Type check failed in binding to <anon>; expected Match but got Nil 
> (Nil)
>    in block <unit> at test_n_threads.p6 line 3
> 
> [jdv@wieldy ~]$ perl6 test_n_threads.p6
> Use of Nil in string contextUse of Nil in string context  in block  at 
> test_n_threads.p6 line 5
> Use of Nil in string context  in block  at test_n_threads.p6 line 5
>    in block  at test_n_threads.p6 line 5
> Use of Nil in string context  in block  at test_n_threads.p6 line 5
> Use of Nil in string context  in block  at test_n_threads.p6 line 5
> [jdv@wieldy ~]$
> [jdv@wieldy ~]$
> [jdv@wieldy ~]$
> [jdv@wieldy ~]$ cat test_1_thread.p6
> use v6;
> 
> PROCESS::<$SCHEDULER>
>      = ThreadPoolScheduler.new(initial_threads => 0, max_threads => 1);
> await map { start {
>      my $foo = "barbaz";
>      $foo ~~ s/.+/{ <a b c>.roll($/.chars).join }/;
> } }, ^100;
> [jdv@wieldy ~]$ cat test_1_thread.p6
> use v6;
> 
> PROCESS::<$SCHEDULER>
>      = ThreadPoolScheduler.new(initial_threads => 0, max_threads => 1);
> await map { start {
>      my $foo = "barbaz";
>      $foo ~~ s/.+/{ <a b c>.roll($/.chars).join }/;
> } }, ^100;
> [jdv@wieldy ~]$ perl6 test_1_thread.p6
> [jdv@wieldy ~]$ perl6 test_1_thread.p6
> [jdv@wieldy ~]$ perl6 test_1_thread.p6
> [jdv@wieldy ~]$
> [jdv@wieldy ~]$
> [jdv@wieldy ~]$
> [jdv@wieldy ~]$ cat test_no_async.p6
> use v6;
> 
> map {
>      my $foo = "barbaz";
>      $foo ~~ s/.+/{ <a b c>.roll($/.chars).join }/;
> }, ^100;
> [jdv@wieldy ~]$ perl6 test_no_async.p6
> [jdv@wieldy ~]$ perl6 test_no_async.p6
> [jdv@wieldy ~]$ perl6 test_no_async.p6
> [jdv@wieldy ~]$
> [jdv@wieldy ~]$
> [jdv@wieldy ~]$
> [jdv@wieldy ~]$ perl6 -v
> This is Rakudo version 2016.07.1-102-ge411e5d built on MoarVM version 
> 2016.07-11-g11e02fe
> implementing Perl 6.c.
> [jdv@wieldy ~]$

Fixed by 739d1a3; test needed.

Reply via email to