Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix and test for RT #123520.
  • Loading branch information
jnthn committed May 4, 2015
1 parent 046e9f5 commit db5a920
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion S17-promise/in.t
@@ -1,7 +1,21 @@
use v6;
use Test;

plan 2;
plan 3;

# RT #123520
# This test comes first in the file so it's the first to start any threads;
# this means we can test the actual bug in the ticket.
{
my @order;
await Promise.anyof(
start({ sleep 3; @order.push(3) }),
Promise.in(1).then({ @order.push(1) }));
sleep 1;
@order.push(2);
sleep 2;
is @order, (1, 2, 3), 'Scheduler did not cause things to run in wrong order';
}

{
my $start = now;
Expand Down

0 comments on commit db5a920

Please sign in to comment.