From: Jerry D. Hedden Date: Fri, 15 Dec 2006 09:22:17 +0000 (-0800) Subject: threads 1.56 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b9c1db01c31454036da94510de234fd7cb233094;p=p5sagit%2Fp5-mst-13.2.git threads 1.56 From: "Jerry D. Hedden" Message-ID: <20061215172217.10959.qmail@web30211.mail.mud.yahoo.com> p4raw-id: //depot/perl@29563 --- diff --git a/ext/threads/Changes b/ext/threads/Changes index 698f337..643155f 100755 --- a/ext/threads/Changes +++ b/ext/threads/Changes @@ -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 diff --git a/ext/threads/README b/ext/threads/README index 3803a26..ae21582 100755 --- a/ext/threads/README +++ b/ext/threads/README @@ -1,4 +1,4 @@ -threads version 1.54 +threads version 1.56 ==================== This module exposes interpreter threads to the Perl level. diff --git a/ext/threads/t/err.t b/ext/threads/t/err.t index a0df7a5..9911187 100644 --- a/ext/threads/t/err.t +++ b/ext/threads/t/err.t @@ -26,14 +26,14 @@ use_ok('threads'); 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 diff --git a/ext/threads/t/exit.t b/ext/threads/t/exit.t index 25fba99..a23d394 100644 --- a/ext/threads/t/exit.t +++ b/ext/threads/t/exit.t @@ -56,7 +56,7 @@ my $rc = $thr->join(); 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 @@ $rc = $thr->join(); 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 @@ run_perl(prog => 'use threads 1.54 qw(exit thread_only);' . 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 @@ is($?>>8, 99, "exit(status) in thread"); 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 @@ is($?>>8, 99, "set_thread_exit_only(0)"); 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();' . diff --git a/ext/threads/t/thread.t b/ext/threads/t/thread.t index cf3a232..3d3989e 100644 --- a/ext/threads/t/thread.t +++ b/ext/threads/t/thread.t @@ -171,7 +171,7 @@ package main; # 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, diff --git a/ext/threads/threads.pm b/ext/threads/threads.pm index a718dcf..eff472f 100755 --- a/ext/threads/threads.pm +++ b/ext/threads/threads.pm @@ -5,7 +5,7 @@ use 5.008; use strict; use warnings; -our $VERSION = '1.54'; +our $VERSION = '1.56'; my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -133,7 +133,7 @@ threads - Perl interpreter-based threads =head1 VERSION -This document describes threads version 1.54 +This document describes threads version 1.56 =head1 SYNOPSIS @@ -845,7 +845,11 @@ specified signal being used in a C<-Ekill()> call. =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 @@ threads are started afterwards. If the above does not work, or is not adequate for your application, then file a bug report on L 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 threads while @@ -930,7 +924,10 @@ of the Perl interpreter. =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 or L), and then +reconstituting it in the joining thread. =item Perl Bugs and the CPAN Version of L @@ -952,7 +949,7 @@ L Discussion Forum on CPAN: L Annotated POD for L: -L +L L, L