summaryrefslogtreecommitdiff
path: root/pod/perlthrtut.pod
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-05-12 01:38:15 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-12 01:38:15 +0000
commitf3278b06ba5642b0217ce1d2ec161817bd5c7100 (patch)
treef007a23f593a49d0f7d06683db50c7604282a294 /pod/perlthrtut.pod
parentaa66001256943dc92a94097f9e379754929b0219 (diff)
downloadperl-f3278b06ba5642b0217ce1d2ec161817bd5c7100.tar.gz
Detypos (and sticking with US spelling since Dan Sugalski
wrote the original text of perlthrtut) p4raw-id: //depot/perl@16552
Diffstat (limited to 'pod/perlthrtut.pod')
-rw-r--r--pod/perlthrtut.pod14
1 files changed, 7 insertions, 7 deletions
diff --git a/pod/perlthrtut.pod b/pod/perlthrtut.pod
index 2fb09c9efd..455be15c59 100644
--- a/pod/perlthrtut.pod
+++ b/pod/perlthrtut.pod
@@ -433,7 +433,7 @@ In the case of a shared array, all the array's elements are shared, and for
a shared hash, all the keys and values are shared. This places
restrictions on what may be assigned to shared array and hash elements: only
simple values or references to shared variables are allowed - this is
-so that a private variable can't accidently become shared. A bad
+so that a private variable can't accidentally become shared. A bad
assignment will cause the thread to die. For example:
use threads;
@@ -508,13 +508,13 @@ by other threads, you must take steps to coordinate access or risk
data inconsistency and race conditions. Note that Perl will protect its
internals from your race conditions, but it won't protect you from you.
-=head1 Synchonisation and control
+=head1 Synchronization and control
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 clumsly and difficult to get right (such as
+standard techniques are clumsily 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.
@@ -525,7 +525,7 @@ No other thread may lock the variable until the the variable is unlocked
by the thread holding the lock. Unlocking happens automatically
when the locking thread exists the outermost block that contains
C<lock()> function. Using lock() is straightforward: this example has
-several threads doing some calculations in parallel, and occasionaly
+several threads doing some calculations in parallel, and occasionally
updating a running total:
use threads;
@@ -540,7 +540,7 @@ updating a running total:
{
lock($total); # block until we obtain the lock
$total += $result
- } # lock implicity released at end of scope
+ } # lock implicitly released at end of scope
last if $result == 0;
}
}
@@ -609,7 +609,7 @@ traditional thread libraries.
Locks are a handy tool to synchronize access to data, and using them
properly is the key to safe shared data. Unfortunately, locks aren't
-without their dangers, espacially when multiple locks are involved.
+without their dangers, especially when multiple locks are involved.
Consider the following code:
use threads;
@@ -652,7 +652,7 @@ order. If, for example, you lock variables $a, $b, and $c, always lock
$a before $b, and $b before $c. It's also best to hold on to locks for
as short a period of time to minimize the risks of deadlock.
-The other syncronisation primitives described below can suffer from
+The other syncronization primitives described below can suffer from
similar problems.
=head2 Queues: Passing Data Around