diff options
author | Jerry D. Hedden <jdhedden@cpan.org> | 2006-12-15 01:22:17 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-12-16 10:03:23 +0000 |
commit | b9c1db01c31454036da94510de234fd7cb233094 (patch) | |
tree | 3e3fe5b25e6f28c935fa2b823f9aeb1823ce5674 /ext/threads | |
parent | 59c7f7d51cc6191d7af83117fc86515eaec4219b (diff) | |
download | perl-b9c1db01c31454036da94510de234fd7cb233094.tar.gz |
threads 1.56
From: "Jerry D. Hedden" <jdhedden@yahoo.com>
Message-ID: <20061215172217.10959.qmail@web30211.mail.mud.yahoo.com>
p4raw-id: //depot/perl@29563
Diffstat (limited to 'ext/threads')
-rwxr-xr-x | ext/threads/Changes | 6 | ||||
-rwxr-xr-x | ext/threads/README | 2 | ||||
-rw-r--r-- | ext/threads/t/err.t | 4 | ||||
-rw-r--r-- | ext/threads/t/exit.t | 10 | ||||
-rw-r--r-- | ext/threads/t/thread.t | 2 | ||||
-rwxr-xr-x | ext/threads/threads.pm | 27 |
6 files changed, 27 insertions, 24 deletions
diff --git a/ext/threads/Changes b/ext/threads/Changes index 698f3379e0..643155f8b4 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 3803a26eed..ae21582635 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 a0df7a53cd..9911187e2a 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 25fba99c94..a23d39470b 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 cf3a232f9d..3d3989ee5b 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 a718dcfa37..eff472f7a1 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<-E<gt>kill()> 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<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 @@ 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<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<threads> Discussion Forum on CPAN: 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> |