Change 29563 by [EMAIL PROTECTED] on 2006/12/16 10:03:23
Subject: [PATCH] threads 1.56
From: "Jerry D. Hedden" <[EMAIL PROTECTED]>
Date: Fri, 15 Dec 2006 09:22:17 -0800 (PST)
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/ext/threads/Changes#32 edit
... //depot/perl/ext/threads/README#30 edit
... //depot/perl/ext/threads/t/err.t#2 edit
... //depot/perl/ext/threads/t/exit.t#11 edit
... //depot/perl/ext/threads/t/thread.t#36 edit
... //depot/perl/ext/threads/threads.pm#81 edit
Differences ...
==== //depot/perl/ext/threads/Changes#32 (xtext) ====
Index: perl/ext/threads/Changes
--- perl/ext/threads/Changes#31~29557~ 2006-12-15 02:14:16.000000000 -0800
+++ perl/ext/threads/Changes 2006-12-16 02:03:23.000000000 -0800
@@ -1,5 +1,11 @@
Revision history for Perl extension threads.
+1.56 Fri Dec 15 12:18:47 EST 2006
+ - More fixes to test suite
+
+1.55 Fri Dec 15 11:24:46 EST 2006
+ - Fixes to test suite
+
1.54 Thu Dec 14 14:12:30 EST 2006
- Added ->error() method
==== //depot/perl/ext/threads/README#30 (xtext) ====
Index: perl/ext/threads/README
--- perl/ext/threads/README#29~29557~ 2006-12-15 02:14:16.000000000 -0800
+++ perl/ext/threads/README 2006-12-16 02:03:23.000000000 -0800
@@ -1,4 +1,4 @@
-threads version 1.54
+threads version 1.56
====================
This module exposes interpreter threads to the Perl level.
==== //depot/perl/ext/threads/t/err.t#2 (text) ====
Index: perl/ext/threads/t/err.t
--- perl/ext/threads/t/err.t#1~29557~ 2006-12-15 02:14:16.000000000 -0800
+++ perl/ext/threads/t/err.t 2006-12-16 02:03:23.000000000 -0800
@@ -26,14 +26,14 @@
no warnings 'threads';
# Create a thread that generates an error
-my $thr = threads->create(sub { my $x = 5/0; });
+my $thr = threads->create(sub { my $x = Foo->new(); });
# Check that thread returns 'undef'
my $result = $thr->join();
ok(! defined($result), 'thread died');
# Check error
-like($thr->error(), 'division by zero', 'thread error');
+like($thr->error(), q/Can't locate object method/, 'thread error');
# Create a thread that 'die's with an object
==== //depot/perl/ext/threads/t/exit.t#11 (text) ====
Index: perl/ext/threads/t/exit.t
--- perl/ext/threads/t/exit.t#10~29557~ 2006-12-15 02:14:16.000000000 -0800
+++ perl/ext/threads/t/exit.t 2006-12-16 02:03:23.000000000 -0800
@@ -56,7 +56,7 @@
ok(! defined($rc), 'Exited: threads->exit()');
-run_perl(prog => 'use threads 1.54;' .
+run_perl(prog => 'use threads 1.56;' .
'threads->exit(86);' .
'exit(99);',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
@@ -104,7 +104,7 @@
ok(! defined($rc), 'Exited: $thr->set_thread_exit_only');
-run_perl(prog => 'use threads 1.54 qw(exit thread_only);' .
+run_perl(prog => 'use threads 1.56 qw(exit thread_only);' .
'threads->create(sub { exit(99); })->join();' .
'exit(86);',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
@@ -112,7 +112,7 @@
is($?>>8, 86, "'use threads 'exit' => 'thread_only'");
-my $out = run_perl(prog => 'use threads 1.54;' .
+my $out = run_perl(prog => 'use threads 1.56;' .
'threads->create(sub {' .
' exit(99);' .
'})->join();' .
@@ -124,7 +124,7 @@
like($out, '1 finished and unjoined', "exit(status) in thread");
-$out = run_perl(prog => 'use threads 1.54 qw(exit thread_only);' .
+$out = run_perl(prog => 'use threads 1.56 qw(exit thread_only);' .
'threads->create(sub {' .
' threads->set_thread_exit_only(0);' .
' exit(99);' .
@@ -137,7 +137,7 @@
like($out, '1 finished and unjoined', "set_thread_exit_only(0)");
-run_perl(prog => 'use threads 1.54;' .
+run_perl(prog => 'use threads 1.56;' .
'threads->create(sub {' .
' $SIG{__WARN__} = sub { exit(99); };' .
' die();' .
==== //depot/perl/ext/threads/t/thread.t#36 (text) ====
Index: perl/ext/threads/t/thread.t
--- perl/ext/threads/t/thread.t#35~29557~ 2006-12-15 02:14:16.000000000
-0800
+++ perl/ext/threads/t/thread.t 2006-12-16 02:03:23.000000000 -0800
@@ -171,7 +171,7 @@
# bugid #24165
-run_perl(prog => 'use threads 1.54;' .
+run_perl(prog => 'use threads 1.56;' .
'sub a{threads->create(shift)} $t = a sub{};' .
'$t->tid; $t->join; $t->tid',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
==== //depot/perl/ext/threads/threads.pm#81 (xtext) ====
Index: perl/ext/threads/threads.pm
--- perl/ext/threads/threads.pm#80~29557~ 2006-12-15 02:14:16.000000000
-0800
+++ perl/ext/threads/threads.pm 2006-12-16 02:03:23.000000000 -0800
@@ -5,7 +5,7 @@
use strict;
use warnings;
-our $VERSION = '1.54';
+our $VERSION = '1.56';
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
@@ -133,7 +133,7 @@
=head1 VERSION
-This document describes threads version 1.54
+This document describes threads version 1.56
=head1 SYNOPSIS
@@ -845,7 +845,11 @@
=back
-=head1 LIMITATIONS
+=head1 BUGS AND LIMITATIONS
+
+Before you consider posting a bug report, please consult, and possibly post a
+message to the discussion forum to see if what you've encountered is a known
+problem.
=over
@@ -876,16 +880,6 @@
If the above does not work, or is not adequate for your application, then file
a bug report on L<http://rt.cpan.org/Public/> against the problematic module.
-=back
-
-=head1 BUGS
-
-Before you consider posting a bug report, please consult, and possibly post a
-message to the discussion forum to see if what you've encountered is a known
-problem.
-
-=over
-
=item Parent-child threads
On some platforms, it might not be possible to destroy I<parent> threads while
@@ -930,7 +924,10 @@
=item Returning objects from threads
-Returning objects from threads does not work.
+Returning objects from threads does not work. Depending on the classes
+involved, you may be able to work around this by returning a serialized
+version of the object (e.g., using L<Data::Dumper> or L<Storable>), and then
+reconstituting it in the joining thread.
=item Perl Bugs and the CPAN Version of L<threads>
@@ -952,7 +949,7 @@
L<http://www.cpanforum.com/dist/threads>
Annotated POD for L<threads>:
-L<http://annocpan.org/~JDHEDDEN/threads-1.54/threads.pm>
+L<http://annocpan.org/~JDHEDDEN/threads-1.56/threads.pm>
L<threads::shared>, L<perlthrtut>
End of Patch.