threads 1.36 - Signalling terminated threads core dumps
authorJerry D. Hedden <jdhedden@cpan.org>
Mon, 10 Jul 2006 13:28:25 +0000 (06:28 -0700)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 11 Jul 2006 09:27:25 +0000 (09:27 +0000)
From: "Jerry D. Hedden" <jerry@hedden.us>
Message-ID: <20060710132825.fb30e530d17747c2b054d625b8945d88.5bdc82d2c0.wbe@email.secureserver.net>

p4raw-id: //depot/perl@28543

ext/threads/Changes
ext/threads/README
ext/threads/t/kill.t
ext/threads/t/thread.t
ext/threads/threads.pm
ext/threads/threads.xs

index 9e15b8b..71d6313 100755 (executable)
@@ -1,6 +1,9 @@
 Revision history for Perl extension threads.
 
-1.35 - Mon Jul 10 09:44:47 EDT 2006
+1.36 Mon Jul 10 15:58:13 EDT 2006
+       - Ignore signals sent to terminated threads
+
+1.35 Mon Jul 10 09:44:47 EDT 2006
        - Upgraded ppport.h to Devel::PPPort 3.09
        - Fix for Borland compiler
 
index c331a36..7269f37 100755 (executable)
@@ -1,8 +1,7 @@
-threads version 1.35
+threads version 1.36
 ====================
 
-This module needs perl 5.8.0 or later compiled with 'useithreads'.
-It exposes interpreter threads to the Perl level.
+This module exposes interpreter threads to the Perl level.
 
 INSTALLATION
 
@@ -15,9 +14,7 @@ To install this module type the following:
 
 DEPENDENCIES
 
-This module requires these other modules and libraries:
-
-    threads::shared
+This module needs perl 5.8.0 or later compiled with 'useithreads'.
 
 COPYRIGHT AND LICENCE
 
index 5d25db3..aff5dd0 100644 (file)
@@ -201,9 +201,11 @@ threads->yield();
 sleep(1);
 
 # Terminate the thread
-ok($thr->kill('TERM'), 'Signalled thread to terminate');
+ok($thr->kill('TERM') == $thr, 'Signalled thread to terminate');
 
 $rc = $thr->join();
 ok($rc eq 'OKAY', 'Thread return value');
 
+ok($thr->kill('TERM'), 'Ignore signal to terminated thread');
+
 # EOF
index 5982236..d29d523 100644 (file)
@@ -171,7 +171,7 @@ package main;
 
 # bugid #24165
 
-run_perl(prog => 'use threads 1.35;
+run_perl(prog => 'use threads 1.36;
                   sub a{threads->create(shift)} $t = a sub{};
                   $t->tid; $t->join; $t->tid',
                   nolib => ($ENV{PERL_CORE}) ? 0 : 1,
index 0152df5..04e0692 100755 (executable)
@@ -5,7 +5,7 @@ use 5.008;
 use strict;
 use warnings;
 
-our $VERSION = '1.35';
+our $VERSION = '1.36';
 my $XS_VERSION = $VERSION;
 $VERSION = eval $VERSION;
 
@@ -113,7 +113,7 @@ threads - Perl interpreter-based threads
 
 =head1 VERSION
 
-This document describes threads version 1.35
+This document describes threads version 1.36
 
 =head1 SYNOPSIS
 
@@ -804,7 +804,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.35/threads.pm>
+L<http://annocpan.org/~JDHEDDEN/threads-1.36/threads.pm>
 
 L<threads::shared>, L<perlthrtut>
 
index 1f3cad1..c648bcd 100755 (executable)
@@ -1079,7 +1079,7 @@ ithread_kill(...)
         /* Set the signal for the thread */
         thread = SV_to_ithread(aTHX_ ST(0));
         MUTEX_LOCK(&thread->mutex);
-        {
+        if (thread->interp) {
             dTHXa(thread->interp);
             PL_psig_pend[signal]++;
             PL_sig_pending = 1;