From: Jarkko Hietaniemi Date: Sun, 12 May 2002 19:48:40 +0000 (+0000) Subject: Add threadsafety caveats. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bdcfa4c71f2cdcdbe5f7cfb1837da43d4adcc767;p=p5sagit%2Fp5-mst-13.2.git Add threadsafety caveats. p4raw-id: //depot/perl@16564 --- diff --git a/ext/threads/threads.pm b/ext/threads/threads.pm index dfc8b8f..2851343 100755 --- a/ext/threads/threads.pm +++ b/ext/threads/threads.pm @@ -245,9 +245,6 @@ Helping with debugging. please join perl-ithreads@perl.org for more information - - - =head1 SEE ALSO L, L, L, L, L diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 9ae5970..ad36f01 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -2739,6 +2739,12 @@ One cannot call Perl using the C syntax, that is, C works, but for example C doesn't. The exact reason isn't known but the current suspect is the F library. +=head2 ext/threads/t/libc + +If this test fails, it indicates that your libc (C library) is not +threadsafe. This particular test stress tests the localtime() call to +find out whether it is threadsafe. See L for more information. + =head2 FreeBSD Failing locale Test 117 For ISO8859-15 Locales The ISO8859-15 locales may fail the locale test 117 in FreeBSD. diff --git a/pod/perlthrtut.pod b/pod/perlthrtut.pod index 8bcbf24..6a47e10 100644 --- a/pod/perlthrtut.pod +++ b/pod/perlthrtut.pod @@ -955,6 +955,16 @@ be little different than ordinary code. Also note that under the current implementation, shared variables use a little more memory and are a little slower than ordinary variables. +=head1 Threadsafety of System Libraries + +Whether various library calls are threadsafe is outside the control +of Perl. Calls often suffering from not being threadsafe include +localtime(), gmtime(), get{gr,host,net,proto,serv,pw}*(), readdir(), +rand(), srand(). If the system Perl is compiled in has threadsafe +variants of these calls, they will be used, but besides that, Perl is +at the mercy of the thread safety or unsafety of the calls. Please +consult your C library call documentation. + =head1 Conclusion A complete thread tutorial could fill a book (and has, many times),