Skip to content

Commit

Permalink
r17889@windhund: schwern | 2006-09-04 04:39:58 -0400
Browse files Browse the repository at this point in the history
     * 5.8.0 threads are no longer supported.  There's too many bugs.
  • Loading branch information
schwern committed Sep 4, 2006
1 parent e30e200 commit 2cfb594
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 13 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
match Perl's for easier integration with Perl aware editors.
(so its "at $file line $line_num." now)
[rt.cpan.org #20639]
* 5.8.0 threads are no longer supported. There's too many bugs.

0.64 Sun Jul 16 02:47:29 PDT 2006
* 0.63's change to test_fail() broke backwards compatibility. They
Expand Down
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CHANGE_WARN

sleep 5;
}
if( $] >= 5.008 && $Config{useithreads} &&
if( $] >= 5.008001 && $Config{useithreads} &&
${$PACKAGE.'::VERSION'} < $LAST_THREAD_CHANGE
)
{
Expand Down
16 changes: 9 additions & 7 deletions lib/Test/Builder.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ $VERSION = eval $VERSION; # make the alpha version come out as a number
# Make Test::Builder thread-safe for ithreads.
BEGIN {
use Config;
# Load threads::shared when threads are turned on
if( $] >= 5.008 && $Config{useithreads} && $INC{'threads.pm'}) {
# Load threads::shared when threads are turned on.
# 5.8.0's threads are so busted we no longer support them.
if( $] >= 5.008001 && $Config{useithreads} && $INC{'threads.pm'}) {
require threads::shared;

# Hack around YET ANOTHER threads::shared bug. It would
Expand Down Expand Up @@ -56,11 +57,9 @@ BEGIN {
return $_[0];
};
}
# 5.8.0's threads::shared is busted when threads are off.
# We emulate it here.
else {
*share = sub { return $_[0] };
*lock = sub { 0 };
require threads::shared;
threads::shared->import;
}
}

Expand Down Expand Up @@ -1750,10 +1749,13 @@ If you fail more than 254 tests, it will be reported as 254.
=head1 THREADS
In perl 5.8.0 and later, Test::Builder is thread-safe. The test
In perl 5.8.1 and later, Test::Builder is thread-safe. The test
number is shared amongst all threads. This means if one thread sets
the test number using current_test() they will all be effected.
While versions earlier than 5.8.1 had threads they contain too many
bugs to support.
Test::Builder is only thread-aware if threads.pm is loaded I<before>
Test::Builder.
Expand Down
2 changes: 2 additions & 0 deletions lib/Test/More.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,8 @@ This may cause problems:
use Test::More
use threads;
5.8.1 and above are supported. Anything below that has too many bugs.
=item Test::Harness upgrade
Expand Down
2 changes: 1 addition & 1 deletion t/diag.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BEGIN {
# lots of threading bugs.
use Config;
BEGIN {
if( $] >= 5.008 && $Config{useithreads} ) {
if( $] >= 5.008001 && $Config{useithreads} ) {
require threads;
'threads'->import;
}
Expand Down
4 changes: 2 additions & 2 deletions t/sort_bug.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ use strict;
use Config;

BEGIN {
unless ( $] >= 5.008 && $Config{'useithreads'} &&
unless ( $] >= 5.008001 && $Config{'useithreads'} &&
eval { require threads; 'threads'->import; 1; })
{
print "1..0 # Skip: no threads\n";
print "1..0 # Skip: no working threads\n";
exit 0;
}
}
Expand Down
4 changes: 2 additions & 2 deletions t/threads.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ BEGIN {

use Config;
BEGIN {
unless ( $] >= 5.008 && $Config{'useithreads'} &&
unless ( $] >= 5.008001 && $Config{'useithreads'} &&
eval { require threads; 'threads'->import; 1; })
{
print "1..0 # Skip: no threads\n";
print "1..0 # Skip: no working threads\n";
exit 0;
}
}
Expand Down

0 comments on commit 2cfb594

Please sign in to comment.