Re: [PATCH] Bring Time::Local to 1.07
[p5sagit/p5-mst-13.2.git] / pod / perlthrtut.pod
index 25a4edf..27ad46e 100644 (file)
@@ -542,7 +542,7 @@ techniques such as queues, which remove some of the hard work involved.
 =head2 Controlling access: lock()
 
 The lock() function takes a shared variable and puts a lock on it.  
-No other thread may lock the variable until the the variable is unlocked
+No other thread may lock the variable until the variable is unlocked
 by the thread holding the lock. Unlocking happens automatically
 when the locking thread exits the outermost block that contains
 C<lock()> function.  Using lock() is straightforward: this example has
@@ -998,6 +998,11 @@ until the feeling passes-- but in case you really want to know,
 the semantics is that fork() duplicates all the threads.
 (In UNIX, at least, other platforms will do something different.)
 
+Similarly, mixing signals and threads should not be attempted.
+Implementations are platform-dependent, and even the POSIX
+semantics may not be what you expect (and Perl doesn't even
+give you the full POSIX API).
+
 =head1 Thread-Safety of System Libraries
 
 Whether various library calls are thread-safe is outside the control
@@ -1011,10 +1016,15 @@ calls, they will be used.  Beyond that, Perl is at the mercy of
 the thread-safety or -unsafety of the calls.  Please consult your
 C library call documentation.
 
-In some platforms the thread-safe interfaces may fail if the result
-buffer is too small (for example getgrent() may return quite large
-group member lists).  Perl will retry growing the result buffer
-a few times, but only up to 64k (for safety reasons).
+On some platforms the thread-safe library interfaces may fail if the
+result buffer is too small (for example the user group databases may
+be rather large, and the reentrant interfaces may have to carry around
+a full snapshot of those databases).  Perl will start with a small
+buffer, but keep retrying and growing the result buffer
+until the result fits.  If this limitless growing sounds bad for
+security or memory consumption reasons you can recompile Perl with
+PERL_REENTRANT_MAXSIZE defined to the maximum number of bytes you will
+allow.
 
 =head1 Conclusion
 
@@ -1066,6 +1076,9 @@ Silberschatz, Abraham, and Peter B. Galvin. Operating System Concepts,
 Arnold, Ken and James Gosling. The Java Programming Language, 2nd
 ed. Addison-Wesley, 1998, ISBN 0-201-31006-6.
 
+comp.programming.threads FAQ,
+L<http://www.serpentine.com/~bos/threads-faq/>
+
 Le Sergent, T. and B. Berthomieu. "Incremental MultiThreaded Garbage
 Collection on Virtually Shared Memory Architectures" in Memory
 Management: Proc. of the International Workshop IWMM 92, St. Malo,