Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Made sleepsort / cas @A test less fragile
  • Loading branch information
lizmat committed Apr 21, 2014
1 parent dec25be commit 2133955
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion S17-concurrency/promise.t
Expand Up @@ -172,7 +172,10 @@ plan 64;
{
my @a;
my @p = (^10).pick(*).map: {
start { sleep $_; cas @a, -> @current { my @ = @current, OUTER::<$_> } }
start {
sleep 2 * $_;
cas @a, -> @current { my @ = @current, OUTER::<$_> };
}
};
my $all = Promise.allof(@p);
isa_ok $all, Promise, 'allof gives a Promise';
Expand Down

0 comments on commit 2133955

Please sign in to comment.