summaryrefslogtreecommitdiff
path: root/dist/threads/lib/threads.pm
diff options
context:
space:
mode:
Diffstat (limited to 'dist/threads/lib/threads.pm')
-rw-r--r--dist/threads/lib/threads.pm17
1 files changed, 9 insertions, 8 deletions
diff --git a/dist/threads/lib/threads.pm b/dist/threads/lib/threads.pm
index f4dee58fd6..9feb4c30d8 100644
--- a/dist/threads/lib/threads.pm
+++ b/dist/threads/lib/threads.pm
@@ -134,7 +134,7 @@ threads - Perl interpreter-based threads
=head1 VERSION
-This document describes threads version 2.02
+This document describes threads version 2.06
=head1 WARNING
@@ -363,10 +363,10 @@ If you add the C<stringify> import option to your C<use threads> declaration,
then using a threads object in a string or a string context (e.g., as a hash
key) will cause its ID to be used as the value:
- use threads qw(stringify);
+ use threads qw(stringify);
- my $thr = threads->create(...);
- print("Thread $thr started...\n"); # Prints: Thread 1 started...
+ my $thr = threads->create(...);
+ print("Thread $thr started\n"); # Prints: Thread 1 started
=item threads->object($tid)
@@ -691,16 +691,17 @@ threaded applications.
To specify a particular stack size for any individual thread, call
C<-E<gt>create()> with a hash reference as the first argument:
- my $thr = threads->create({'stack_size' => 32*4096}, \&foo, @args);
+ my $thr = threads->create({'stack_size' => 32*4096},
+ \&foo, @args);
=item $thr2 = $thr1->create(FUNCTION, ARGS)
This creates a new thread (C<$thr2>) that inherits the stack size from an
existing thread (C<$thr1>). This is shorthand for the following:
- my $stack_size = $thr1->get_stack_size();
- my $thr2 = threads->create({'stack_size' => $stack_size},
- FUNCTION, ARGS);
+ my $stack_size = $thr1->get_stack_size();
+ my $thr2 = threads->create({'stack_size' => $stack_size},
+ FUNCTION, ARGS);
=back