summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/ext/XS-APItest/t/keyword_plugin_threads.t
blob: db23ce7d58c85250dd57849643790e782586903f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!perl
use strict;
use warnings;

require '../../t/test.pl';

use Config;
if (!$Config{useithreads}) {
    skip_all("keyword_plugin thread test requires threads");
}

plan(1);

fresh_perl_is( <<'----', <<'====', {}, "loading XS::APItest in threads works");
use strict;
use warnings;

use threads;

require '../../t/test.pl';
watchdog(5);

for my $t (1 .. 3) {
    threads->create(sub {
        require XS::APItest;
    })->join;
}

print "all is well\n";
----
all is well
====