Skip to content

Commit

Permalink
Revert "Test issues with &await"
Browse files Browse the repository at this point in the history
This reverts commit 9a9ec49.

This isn't the direction we want to go in.
Per: rakudo/rakudo@7df750a108
  • Loading branch information
zoffixznet committed Dec 20, 2017
1 parent 9a9ec49 commit 37d56be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
14 changes: 1 addition & 13 deletions S17-promise/nonblocking-await.t
@@ -1,7 +1,7 @@
use v6.d.PREVIEW;
use Test;

plan 28;
plan 27;

# Limit scheduler to just 4 real threads, so we'll clearly be needing the
# non-blocking await support for these to pass.
Expand Down Expand Up @@ -271,15 +271,3 @@ PROCESS::<$SCHEDULER> := ThreadPoolScheduler.new(max_threads => 4);
is @foo.elems, 4, "slips awaited over get flattened out";
}
}

{ # https://github.com/rakudo/rakudo/issues/1323
# Await must be called in sink context here to trigger the covered bug.
# Gymnastics with atomic ints are just to reduce test runtime; the point
# of the test is that await awaits in this case for all Promises to
# complete instead of just returning immediately.
# (same test exists in 6.c tests on purpose; to cover Rakudo impl)
my atomicint $x;
sub p { start { sleep .3; $x++ } }
await [[[p(), [p(), [p(),]]], [p(), p(), p()]], [p(), p(), p()]];
is-deeply $x, 9, '&await awaits when given nested containerized iterables';
}
14 changes: 1 addition & 13 deletions S17-promise/start.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 60;
plan 59;

throws-like { await }, Exception, "a bare await should not work";

Expand Down Expand Up @@ -248,15 +248,3 @@ lives-ok {
});
nok $wrong, 'No data races on closure interpolation in strings';
}

{ # https://github.com/rakudo/rakudo/issues/1323
# Await must be called in sink context here to trigger the covered bug.
# Gymnastics with atomic ints are just to reduce test runtime; the point
# of the test is that await awaits in this case for all Promises to
# complete instead of just returning immediately.
# (same test exists in 6.d tests on purpose; to cover Rakudo impl)
my atomicint $x;
sub p { start { sleep .3; $x++ } }
await [[[p(), [p(), [p(),]]], [p(), p(), p()]], [p(), p(), p()]];
is-deeply $x, 9, '&await awaits when given nested containerized iterables';
}

0 comments on commit 37d56be

Please sign in to comment.