Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async related data issue #5514

Closed
p6rt opened this issue Aug 2, 2016 · 5 comments
Closed

async related data issue #5514

p6rt opened this issue Aug 2, 2016 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Aug 2, 2016

Migrated from rt.perl.org#128809 (status was 'resolved')

Searchable as RT128809$

@p6rt
Copy link
Author

p6rt commented Aug 2, 2016

From @jdv

[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/.+/{ &lt;a b c&gt;.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/.+/{ &lt;a b c&gt;.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/.+/{ &lt;a b c&gt;.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 ~]$

@p6rt
Copy link
Author

p6rt commented Aug 17, 2016

From @jnthn

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/.+/{ &lt;a b c&gt;.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/.+/{ &lt;a b c&gt;.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/.+/{ &lt;a b c&gt;.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/.+/{ &lt;a b c&gt;.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.

@p6rt
Copy link
Author

p6rt commented Aug 17, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Aug 17, 2016

From @zoffixznet

Tests added in Raku/roast@16d333d4b3

@p6rt
Copy link
Author

p6rt commented Aug 17, 2016

@zoffixznet - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant