Skip to content

Instantly share code, notes, and snippets.

@Tux
Created January 29, 2016 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tux/fb1b744f31d3ae317b16 to your computer and use it in GitHub Desktop.
Save Tux/fb1b744f31d3ae317b16 to your computer and use it in GitHub Desktop.
await causes crash
ok 271 - new for Channel
Internal error: zeroed target thread ID in work pass
caused by this code:
for in () -> $in {
ok (my $csv = Text::CSV.new, "new for Channel");
my @d;
my $ch = Channel.new;
my $thr = start {
react {
whenever $ch -> \row {
@d.push: row;
LAST { done; }
}
}
}
$csv.CSV (in => $in, out => $ch, :!meta);
await $thr;
is-deeply ([@d], $full-aoa, "csv => Channel { s-in ($in) }");
}
if I put a «say "await";» before «await $thr;» it always passes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment