summaryrefslogtreecommitdiff
path: root/dist/threads
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-03-11 14:43:33 -0700
committerKarl Williamson <khw@cpan.org>2016-03-11 14:49:26 -0700
commite46aa1ddb7d58d270bbc45cef016b0577cfdecaa (patch)
tree2c2bae16536e85b2786e98dda62579ffa5c90c27 /dist/threads
parentfa6c7d00a8b0cf48c0f78066f87065cfb43d601b (diff)
downloadperl-e46aa1ddb7d58d270bbc45cef016b0577cfdecaa.tar.gz
Fix various pod errors.
Mostly these are too long verbatim lines.
Diffstat (limited to 'dist/threads')
-rw-r--r--dist/threads/lib/threads.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/dist/threads/lib/threads.pm b/dist/threads/lib/threads.pm
index 1a6316f64a..f4dee58fd6 100644
--- a/dist/threads/lib/threads.pm
+++ b/dist/threads/lib/threads.pm
@@ -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 out: Thread 1 started...
+ my $thr = threads->create(...);
+ print("Thread $thr started...\n"); # Prints: Thread 1 started...
=item threads->object($tid)
@@ -691,15 +691,16 @@ 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