# New Ticket Created by Justin DeVuyst
# Please include the string: [perl #128809]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=128809 >
[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 ~]$