# New Ticket Created by Rob Hoelz
# Please include the string: [perl #124073]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=124073 >
The example program (attached) invokes &worker with an incorrect number of
parameters, but sometimes (19/100) the program locks up, and other times
(52/100) throws the wrong exception (Type check failed in binding exception;
expected 'Any' but got 'Mu'). 29/100 times, the correct exception (Unhandled
exception: Too few positionals passed; expected 2 arguments but got 1) is
thrown.
I'm testing this on the JVM right now, but as can be expected, it's taking a
lot longer.
use v6;
sub worker(Any $a, Int $b) {}
my $value = Any;
my @workers = (^2).map: {
start { worker($value) }
};
await @workers;