diff options
author | Jerry D. Hedden <jdhedden@cpan.org> | 2006-11-02 21:37:16 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-03 14:01:30 +0000 |
commit | 70dc2d882add6f056d8cfd04b3f8e0c3a5a3e509 (patch) | |
tree | e373371d91e9dd44640bddaa7782c7b828f32e3c /ext/threads | |
parent | 816b255b3713d16e7c9ee4c3736d7096b851b609 (diff) | |
download | perl-70dc2d882add6f056d8cfd04b3f8e0c3a5a3e509.tar.gz |
threads 1.49
From: "Jerry D. Hedden" <jdhedden@yahoo.com>
Message-ID: <20061103133716.95143.qmail@web30214.mail.mud.yahoo.com>
p4raw-id: //depot/perl@29199
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/exit.t | 10 | ||||
-rw-r--r-- | ext/threads/t/thread.t | 2 | ||||
-rwxr-xr-x | ext/threads/threads.pm | 6 | ||||
-rwxr-xr-x | ext/threads/threads.xs | 5 |
6 files changed, 21 insertions, 10 deletions
diff --git a/ext/threads/Changes b/ext/threads/Changes index 360eafc3a4..f29126ff4c 100755 --- a/ext/threads/Changes +++ b/ext/threads/Changes @@ -1,5 +1,11 @@ Revision history for Perl extension threads. +1.49 Fri Nov 3 08:33:28 EST 2006 + - Fix a warning message + +1.48 Thu Nov 2 12:33:22 EST 2006 + - Fix for segfault during thread destruction + 1.47 Mon Oct 30 16:02:53 EST 2006 - Fix t/thread.t crash under Win32 - Test multiple embedded Perl support diff --git a/ext/threads/README b/ext/threads/README index ea749c5d64..effd009bfe 100755 --- a/ext/threads/README +++ b/ext/threads/README @@ -1,4 +1,4 @@ -threads version 1.47 +threads version 1.49 ==================== This module exposes interpreter threads to the Perl level. diff --git a/ext/threads/t/exit.t b/ext/threads/t/exit.t index ed6c48b79b..8eb54c05ac 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.47;' . +run_perl(prog => 'use threads 1.49;' . '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.47 qw(exit thread_only);' . +run_perl(prog => 'use threads 1.49 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.47 qw(exit thread_only);' . is($?>>8, 86, "'use threads 'exit' => 'thread_only'"); -my $out = run_perl(prog => 'use threads 1.47;' . +my $out = run_perl(prog => 'use threads 1.49;' . '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.47 qw(exit thread_only);' . +$out = run_perl(prog => 'use threads 1.49 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.47;' . +run_perl(prog => 'use threads 1.49;' . 'threads->create(sub {' . ' $SIG{__WARN__} = sub { exit(99); };' . ' die();' . diff --git a/ext/threads/t/thread.t b/ext/threads/t/thread.t index 9cb69c9876..c4be8fe081 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.47;' . +run_perl(prog => 'use threads 1.49;' . '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 45590136de..32d592f20d 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.47'; +our $VERSION = '1.49'; my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -133,7 +133,7 @@ threads - Perl interpreter-based threads =head1 VERSION -This document describes threads version 1.47 +This document describes threads version 1.49 =head1 SYNOPSIS @@ -938,7 +938,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.47/threads.pm> +L<http://annocpan.org/~JDHEDDEN/threads-1.49/threads.pm> L<threads::shared>, L<perlthrtut> diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index 977a47a4b2..2002619321 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -174,6 +174,11 @@ S_ithread_destruct(pTHX_ ithread *thread) /* Remove from circular list of threads */ MUTEX_LOCK(&MY_POOL.create_destruct_mutex); + if ((! thread->next || ! thread->prev) && ckWARN_d(WARN_INTERNAL)) { + Perl_warner(aTHX_ packWARN(WARN_INTERNAL), + "Inconsistency in internal threads list found " + "during destruction of thread %" UVuf, thread->tid); + } if (thread->next) thread->next->prev = thread->prev; if (thread->prev) thread->prev->next = thread->next; thread->next = NULL; |