From: Jarkko Hietaniemi Date: Fri, 16 Nov 2001 13:24:28 +0000 (+0000) Subject: Further discourage old Thread code; tell how to tell X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8a20485cc87712d932e15dd6a022b0240d779a6f;hp=73e350d9d5d4fc48f0ec92bcf573a95a671ec89c;p=p5sagit%2Fp5-mst-13.2.git Further discourage old Thread code; tell how to tell the difference. p4raw-id: //depot/perl@13043 --- diff --git a/lib/Thread.pm b/lib/Thread.pm index c648954..4e88706 100644 --- a/lib/Thread.pm +++ b/lib/Thread.pm @@ -52,15 +52,24 @@ In Perl 5.8 the ithreads model became available through the C module. Neither model is configured by default into Perl (except, as mentioned -above, in Win32 ithreads are always available.) +above, in Win32 ithreads are always available.) You can see your +Perl's threading configuration by running C and looking for +the I variables, or inside script by C +and testing for C<$Config{use5005threads}> and C<$Config{useithreads}>. + +For old code and interim backwards compatibility, the Thread module +has been reworked to function as a frontend for both 5005threads and +ithreads. -For backwards compatibility, the Thread module has been reworked -to function as a frontend for both 5005threads and ithreads. Note that the compatibility is not complete: because the data sharing models are directly opposed, anything to do with data sharing has to be thought differently. With the ithreads you must explicitly share() variables between the threads. +For new code the use of the C module is discouraged and +the direct use use of the C and C modules +is encouraged instead. + Finally, note that there are many known serious problems with the 5005threads, one of the least of which is that regular expression match variables like $1 are not threadsafe, that is, they easily get