summaryrefslogtreecommitdiff
path: root/pod/perlthrtut.pod
diff options
context:
space:
mode:
authorIain Truskett <spoon@cpan.org>2002-07-08 23:53:59 +1000
committerJarkko Hietaniemi <jhi@iki.fi>2002-07-08 12:08:27 +0000
commit9e75ef81e1568429e0c4568e9b0c249c1402730d (patch)
treeb60ce25986db7efd2cc007fe9640dc0df3b01f24 /pod/perlthrtut.pod
parent33cec765dee77059e95fc416e6aec7ea9543797d (diff)
downloadperl-9e75ef81e1568429e0c4568e9b0c249c1402730d.tar.gz
[DOC PATCH] perlthrtut.pod
Message-ID: <20020708035359.GB14168@eh.org> p4raw-id: //depot/perl@17417
Diffstat (limited to 'pod/perlthrtut.pod')
-rw-r--r--pod/perlthrtut.pod16
1 files changed, 8 insertions, 8 deletions
diff --git a/pod/perlthrtut.pod b/pod/perlthrtut.pod
index 583faceaf2..6dab7ed7cb 100644
--- a/pod/perlthrtut.pod
+++ b/pod/perlthrtut.pod
@@ -29,8 +29,8 @@ class, while ithreads uses the L<threads> class. Note the change in case.
The ithreads code has been available since Perl 5.6.0, and is considered
stable. The user-level interface to ithreads (the L<threads> classes)
-appeared in the 5.8.0 release, and as of this time is considered stable,
-although as with all new features, should be treated with caution.
+appeared in the 5.8.0 release, and as of this time is considered stable
+although it should be treated with caution as with all new features.
=head1 What Is A Thread Anyway?
@@ -286,11 +286,11 @@ Future versions of Perl may fix this problem.
=head2 Creating Threads
The L<threads> package provides the tools you need to create new
-threads. Like any other module, you need to tell Perl you want to use
+threads. Like any other module, you need to tell Perl that you want to use
it; C<use threads> imports all the pieces you need to create basic
threads.
-The simplest, straightforward way to create a thread is with new():
+The simplest, most straightforward way to create a thread is with new():
use threads;
@@ -334,7 +334,7 @@ C<create()> is a synonym for C<new()>.
There are times when you may find it useful to have a thread
explicitly give up the CPU to another thread. Your threading package
might not support preemptive multitasking for threads, for example, or
-you may be doing something compute-intensive and want to make sure
+you may be doing something processor-intensive and want to make sure
that the user-interface thread gets called frequently. Regardless,
there are times that you might want a thread to give up the processor.
@@ -434,7 +434,7 @@ This is similar in feel to what happens when a UNIX process forks,
except that in this case, the data is just copied to a different part of
memory within the same process rather than a real fork taking place.
-To make use of threading however, one usually want the threads to share
+To make use of threading however, one usually wants the threads to share
at least some data between themselves. This is done with the
L<threads::shared> module and the C< : shared> attribute:
@@ -533,7 +533,7 @@ Perl provides a number of mechanisms to coordinate the interactions
between themselves and their data, to avoid race conditions and the like.
Some of these are designed to resemble the common techniques used in thread
libraries such as C<pthreads>; others are Perl-specific. Often, the
-standard techniques are clumsily and difficult to get right (such as
+standard techniques are clumsy and difficult to get right (such as
condition waits). Where possible, it is usually easier to use Perlish
techniques such as queues, which remove some of the hard work involved.
@@ -914,7 +914,7 @@ things we've covered. This program finds prime numbers using threads.
This program uses the pipeline model to generate prime numbers. Each
thread in the pipeline has an input queue that feeds numbers to be
checked, a prime number that it's responsible for, and an output queue
-that into which it funnels numbers that have failed the check. If the thread
+into which it funnels numbers that have failed the check. If the thread
has a number that's failed its check and there's no child thread, then
the thread must have found a new prime number. In that case, a new
child thread is created for that prime and stuck on the end of the