summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2001-04-09 00:48:04 +0000
committerGurusamy Sarathy <gsar@cpan.org>2001-04-09 00:48:04 +0000
commit17a9312cad5ed64ba042d3290b6b96c0c0cf8f59 (patch)
treee6fd8956e75b6539fa389eeb7ea96c6f071df31b
parente3353f41897a348f527e69c6cd248a086635b185 (diff)
downloadperl-17a9312cad5ed64ba042d3290b6b96c0c0cf8f59.tar.gz
add note about ithreads and Thread.pm (too many people are
confused by the fact that Thread.pm is built and installed under non-5005threads but doesn't work) p4raw-id: //depot/maint-5.6/perl@9646
-rw-r--r--ext/Thread/Thread.pm9
-rw-r--r--ext/Thread/Thread.xs8
2 files changed, 16 insertions, 1 deletions
diff --git a/ext/Thread/Thread.pm b/ext/Thread/Thread.pm
index c752e3d6dd..23f9fe5138 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 a113eb74e1..15e2aa27c3 100644
--- a/ext/Thread/Thread.xs
+++ b/ext/Thread/Thread.xs
@@ -321,7 +321,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
}