summaryrefslogtreecommitdiff
path: root/ext/Thread/create.t
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Thread/create.t')
-rw-r--r--ext/Thread/create.t17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/Thread/create.t b/ext/Thread/create.t
new file mode 100644
index 0000000000..7d6d189e92
--- /dev/null
+++ b/ext/Thread/create.t
@@ -0,0 +1,17 @@
+use Thread;
+sub start_here {
+ my $i;
+ print "In start_here with args: @_\n";
+ for ($i = 1; $i <= 5; $i++) {
+ print "start_here: $i\n";
+ sleep 1;
+ }
+}
+
+print "Starting new thread now\n";
+$t = new Thread \&start_here, qw(foo bar baz);
+print "Started thread $t\n";
+for ($count = 1; $count <= 5; $count++) {
+ print "main: $count\n";
+ sleep 1;
+}