Call $encoding->decode($sv) without a $chk argument.
[p5sagit/p5-mst-13.2.git] / pod / perlthrtut.pod
index 10a7c39..6dab7ed 100644 (file)
@@ -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:
 
@@ -465,8 +465,8 @@ assignment will cause the thread to die. For example:
     ... create some threads ...
 
     $hash{a} = 1;      # all threads see exists($hash{a}) and $hash{a} == 1
-    $hash{a} = $var    # okay - copy-by-value: same affect as previous
-    $hash{a} = $svar   # okay - copy-by-value: same affect as previous
+    $hash{a} = $var    # okay - copy-by-value: same effect as previous
+    $hash{a} = $svar   # okay - copy-by-value: same effect as previous
     $hash{a} = \$svar  # okay - a reference to a shared variable
     $hash{a} = \$var   # This will die
     delete $hash{a}    # okay - all threads will see !exists($hash{a})
@@ -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
@@ -1048,6 +1048,9 @@ Management: Proc. of the International Workshop IWMM 92, St. Malo,
 France, September 1992, Yves Bekkers and Jacques Cohen, eds. Springer,
 1992, ISBN 3540-55940-X (real-life thread applications).
 
+Artur Bergman, "Where Wizards Fear To Tread", June 11, 2002,
+L<http://www.perl.com/pub/a/2002/06/11/threads.html>
+
 =head1 Acknowledgements
 
 Thanks (in no particular order) to Chaim Frenkel, Steve Fink, Gurusamy