-
-
Save pzl/b53064b335457c417dbd to your computer and use it in GitHub Desktop.
perl threads test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
has thread support | |
has ithread support | |
config result: 0 | |
eval result: 1 | |
threads version: 1.960000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
require v5.10; | |
use Config; | |
if ($Config{usethreads}) { | |
print "has thread support\n"; | |
} | |
if ($Config{useithreads}) { | |
print "has ithread support\n"; | |
} | |
my $cft; | |
my $evt; | |
my $thv; | |
$cft = $Config{useithreads}; | |
$evt = eval "use threads; use threads::shared; use Thread::Queue; 1"; | |
$thv = $threads::VERSION; | |
printf("config result: %d\neval result: %d\nthreads version: %f\n", | |
$cft,$evt,$thv); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment