From: Jarkko Hietaniemi Date: Mon, 9 Apr 2001 02:13:04 +0000 (+0000) Subject: Integrate change #9646 from maintperl into mainline. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=948a8a50b3fb40ab50e2ecb64a39deb2fdc5bfe0;p=p5sagit%2Fp5-mst-13.2.git Integrate change #9646 from maintperl into mainline. add note about ithreads and Thread.pm p4raw-link: @9646 on //depot/maint-5.6/perl: 17a9312cad5ed64ba042d3290b6b96c0c0cf8f59 p4raw-id: //depot/perl@9648 p4raw-integrated: from //depot/maint-5.6/perl@9647 'merge in' ext/Thread/Thread.pm (@7247..) ext/Thread/Thread.xs (@9547..) --- diff --git a/ext/Thread/Thread.pm b/ext/Thread/Thread.pm index 3a54548..3deef81 100644 --- a/ext/Thread/Thread.pm +++ b/ext/Thread/Thread.pm @@ -12,6 +12,15 @@ $VERSION = "1.0"; Thread - manipulate threads in Perl (EXPERIMENTAL, subject to change) +=head1 CAVEAT + +The Thread extension requires Perl to be built in a particular way to +enable the older 5.005 threading model. Just to confuse matters, there +is an alternate threading model known as "ithreads" that does NOT +support this extension. If you are using a binary distribution such +as ActivePerl that is built with ithreads support, this extension CANNOT +be used. + =head1 SYNOPSIS use Thread; diff --git a/ext/Thread/Thread.xs b/ext/Thread/Thread.xs index f87e7c4..cb2e395 100644 --- a/ext/Thread/Thread.xs +++ b/ext/Thread/Thread.xs @@ -322,7 +322,13 @@ newthread (pTHX_ SV *startsv, AV *initargs, char *classname) return sv; #else - croak("No threads in this perl"); +# ifdef USE_ITHREADS + croak("This perl was built for \"ithreads\", which currently does not support Thread.pm.\n" + "Run \"perldoc Thread\" for more information"); +# else + croak("This perl was not built with support for 5.005-style threads.\n" + "Run \"perldoc Thread\" for more information"); +# endif return &PL_sv_undef; #endif }