7 use VPIT::TestHelpers (
8 threads => [ 'Scope::Upper' => 'Scope::Upper::SU_THREADSAFE()' ],
14 use Scope::Upper qw<yield UP>;
19 my $tid = threads->tid();
31 my $foo = yield $tid .. $tid + 2 => UP;
32 fail "$p: not reached";
35 fail "$p: not reached";
40 is_deeply \@res, [ -1, $tid .. $tid + 2, -2 ], "$p: yielded correctly";
43 my @threads = map spawn(\&up1), 1 .. 30;
45 $_->join for @threads;
49 done_testing(scalar(@threads) + 1);