Skip to content

Instantly share code, notes, and snippets.

@pzl
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pzl/b53064b335457c417dbd to your computer and use it in GitHub Desktop.
Save pzl/b53064b335457c417dbd to your computer and use it in GitHub Desktop.
perl threads test
has thread support
has ithread support
config result: 0
eval result: 1
threads version: 1.960000
#!/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