7 use Scope::Upper::TestThreads;
11 use Scope::Upper qw<yield UP>;
16 my $tid = threads->tid();
28 my $foo = yield $tid .. $tid + 2 => UP;
29 fail "$p: not reached";
32 fail "$p: not reached";
37 is_deeply \@res, [ -1, $tid .. $tid + 2, -2 ], "$p: yielded correctly";
40 my @threads = map spawn(\&up1), 1 .. 30;
42 $_->join for @threads;
46 done_testing(scalar(@threads) + 1);