From: Jerry D. Hedden Date: Tue, 31 Oct 2006 05:26:25 +0000 (-0800) Subject: threads 1.47 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b5c80a23c3ece63b39db7006ca4a117e0dc5b7c3;p=p5sagit%2Fp5-mst-13.2.git threads 1.47 From: "Jerry D. Hedden" Message-ID: <20061031132626.18317.qmail@web30214.mail.mud.yahoo.com> p4raw-id: //depot/perl@29171 --- diff --git a/ext/threads/Changes b/ext/threads/Changes index 12146c7..360eafc 100755 --- a/ext/threads/Changes +++ b/ext/threads/Changes @@ -1,5 +1,9 @@ Revision history for Perl extension threads. +1.47 Mon Oct 30 16:02:53 EST 2006 + - Fix t/thread.t crash under Win32 + - Test multiple embedded Perl support + 1.46 Fri Oct 27 19:51:48 EST 2006 - Support multiple embedded Perls - Document workaround for non-threadsafe modules diff --git a/ext/threads/README b/ext/threads/README index ae0cfe5..ea749c5 100755 --- a/ext/threads/README +++ b/ext/threads/README @@ -1,4 +1,4 @@ -threads version 1.46 +threads version 1.47 ==================== This module exposes interpreter threads to the Perl level. diff --git a/ext/threads/t/exit.t b/ext/threads/t/exit.t index f91b351..ed6c48b 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.37;' . +run_perl(prog => 'use threads 1.47;' . '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.37 qw(exit thread_only);' . +run_perl(prog => 'use threads 1.47 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.37 qw(exit thread_only);' . is($?>>8, 86, "'use threads 'exit' => 'thread_only'"); -my $out = run_perl(prog => 'use threads 1.37;' . +my $out = run_perl(prog => 'use threads 1.47;' . '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.37 qw(exit thread_only);' . +$out = run_perl(prog => 'use threads 1.47 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.37;' . +run_perl(prog => 'use threads 1.47;' . 'threads->create(sub {' . ' $SIG{__WARN__} = sub { exit(99); };' . ' die();' . diff --git a/ext/threads/t/stack.t b/ext/threads/t/stack.t index 69ecb1c..b5cb11e 100644 --- a/ext/threads/t/stack.t +++ b/ext/threads/t/stack.t @@ -34,7 +34,7 @@ BEGIN { print("1..18\n"); ### Number of tests that will be run ### }; -use threads 1.09 ('stack_size' => 32*4096); +use threads ('stack_size' => 32*4096); ok(1, 1, 'Loaded'); ### Start of Testing ### diff --git a/ext/threads/t/thread.t b/ext/threads/t/thread.t index 61e185d..9cb69c9 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.46;' . +run_perl(prog => 'use threads 1.47;' . '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 43a7cca..4559013 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.46'; +our $VERSION = '1.47'; my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -133,7 +133,7 @@ threads - Perl interpreter-based threads =head1 VERSION -This document describes threads version 1.46 +This document describes threads version 1.47 =head1 SYNOPSIS @@ -938,7 +938,7 @@ L Discussion Forum on CPAN: L Annotated POD for L: -L +L L, L diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index 967a6ed..81f9f65 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -237,17 +237,7 @@ int Perl_ithread_hook(pTHX) { dMY_POOL; - - int veto_cleanup = 0; - - if (aTHX == MY_POOL.main_thread.interp) { - veto_cleanup = S_exit_warning(aTHX); - if (! veto_cleanup) { - MUTEX_DESTROY(&MY_POOL.create_destruct_mutex); - } - } - - return (veto_cleanup); + return ((aTHX == MY_POOL.main_thread.interp) ? S_exit_warning(aTHX) : 0); }