summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/ext/Thread/create.t
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/ext/Thread/create.t')
-rw-r--r--contrib/perl5/ext/Thread/create.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/contrib/perl5/ext/Thread/create.t b/contrib/perl5/ext/Thread/create.t
index 7d6d189..df8fc77 100644
--- a/contrib/perl5/ext/Thread/create.t
+++ b/contrib/perl5/ext/Thread/create.t
@@ -1,4 +1,7 @@
-use Thread;
+use Thread 'async';
+use Config;
+use Tie::Hash;
+
sub start_here {
my $i;
print "In start_here with args: @_\n";
@@ -8,6 +11,12 @@ sub start_here {
}
}
+async {
+ tie my(%h), 'Tie::StdHash';
+ %h = %Config;
+ print "running on $h{archname}\n";
+};
+
print "Starting new thread now\n";
$t = new Thread \&start_here, qw(foo bar baz);
print "Started thread $t\n";
OpenPOWER on IntegriCloud