New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PATCH] Upgrade to threads 2.09 #15343
Comments
From @jdheddenThis is a bug report for perl from jdhedden@cpan.org, The attached patch upgrades 'threads' to version 2.09. The patch updates the 'threads' POD to document that The patch does not contain any functional changes. Flags: Site configuration information for perl 5.22.2: Configured by Debian Project at Sat Apr 30 12:20:51 UTC 2016. Summary of my perl5 (revision 5 version 22 subversion 2) configuration: Locally applied patches: @INC for perl 5.22.2: Environment for perl 5.22.2: |
From @jdhedden0001-Upgrade-to-threads-2.09.patchFrom fc85c3662dd4b37d8bf5610f41c2665a9eb51d2a Mon Sep 17 00:00:00 2001
From: jdhedden <jdhedden@cpan.org>
Date: Fri, 20 May 2016 14:59:02 -0400
Subject: [PATCH] Upgrade to threads 2.09
---
Porting/Maintainers.pl | 2 +-
dist/threads/lib/threads.pm | 16 ++++++++++++++--
dist/threads/t/exit.t | 10 +++++-----
dist/threads/t/thread.t | 2 +-
4 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 9905417..ecd6ab7 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1177,7 +1177,7 @@ use File::Glob qw(:case);
},
'threads' => {
- 'DISTRIBUTION' => 'JDHEDDEN/threads-2.08.tar.gz',
+ 'DISTRIBUTION' => 'JDHEDDEN/threads-2.09.tar.gz',
'FILES' => q[dist/threads],
'EXCLUDED' => [
qr{^examples/},
diff --git a/dist/threads/lib/threads.pm b/dist/threads/lib/threads.pm
index 182c359..67086da 100644
--- a/dist/threads/lib/threads.pm
+++ b/dist/threads/lib/threads.pm
@@ -5,7 +5,7 @@ use 5.008;
use strict;
use warnings;
-our $VERSION = '2.08';
+our $VERSION = '2.09';
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
@@ -134,7 +134,7 @@ threads - Perl interpreter-based threads
=head1 VERSION
-This document describes threads version 2.08
+This document describes threads version 2.09
=head1 WARNING
@@ -1061,6 +1061,18 @@ In prior perl versions, spawning threads with open directory handles would
crash the interpreter.
L<[perl #75154]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75154>
+=item Detached threads and global destruction
+
+If the main thread exits while there are detached threads which are still
+running, then Perl's global destruction phase is not executed because
+otherwise certain global structures that control the operation of threads and
+that are allocated in the main thread's memory may get destroyed before the
+detached thread is destroyed.
+
+If you are using any code that requires the execution of the global
+destruction phase for clean up (e.g., removing temp files), then do not use
+detached threads, but rather join all threads before exiting the program.
+
=item Perl Bugs and the CPAN Version of L<threads>
Support for threads extends beyond the code in this module (i.e.,
diff --git a/dist/threads/t/exit.t b/dist/threads/t/exit.t
index d9c4aa7..9e9b7f5 100644
--- a/dist/threads/t/exit.t
+++ b/dist/threads/t/exit.t
@@ -48,7 +48,7 @@ my $rc = $thr->join();
ok(! defined($rc), 'Exited: threads->exit()');
-run_perl(prog => 'use threads 2.08;' .
+run_perl(prog => 'use threads 2.09;' .
'threads->exit(86);' .
'exit(99);',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
@@ -98,7 +98,7 @@ $rc = $thr->join();
ok(! defined($rc), 'Exited: $thr->set_thread_exit_only');
-run_perl(prog => 'use threads 2.08 qw(exit thread_only);' .
+run_perl(prog => 'use threads 2.09 qw(exit thread_only);' .
'threads->create(sub { exit(99); })->join();' .
'exit(86);',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
@@ -108,7 +108,7 @@ run_perl(prog => 'use threads 2.08 qw(exit thread_only);' .
is($?>>8, 86, "'use threads 'exit' => 'thread_only'");
}
-my $out = run_perl(prog => 'use threads 2.08;' .
+my $out = run_perl(prog => 'use threads 2.09;' .
'threads->create(sub {' .
' exit(99);' .
'});' .
@@ -124,7 +124,7 @@ my $out = run_perl(prog => 'use threads 2.08;' .
like($out, qr/1 finished and unjoined/, "exit(status) in thread");
-$out = run_perl(prog => 'use threads 2.08 qw(exit thread_only);' .
+$out = run_perl(prog => 'use threads 2.09 qw(exit thread_only);' .
'threads->create(sub {' .
' threads->set_thread_exit_only(0);' .
' exit(99);' .
@@ -141,7 +141,7 @@ $out = run_perl(prog => 'use threads 2.08 qw(exit thread_only);' .
like($out, qr/1 finished and unjoined/, "set_thread_exit_only(0)");
-run_perl(prog => 'use threads 2.08;' .
+run_perl(prog => 'use threads 2.09;' .
'threads->create(sub {' .
' $SIG{__WARN__} = sub { exit(99); };' .
' die();' .
diff --git a/dist/threads/t/thread.t b/dist/threads/t/thread.t
index 24cf2f3..4bd96d0 100644
--- a/dist/threads/t/thread.t
+++ b/dist/threads/t/thread.t
@@ -161,7 +161,7 @@ package main;
# bugid #24165
-run_perl(prog => 'use threads 2.08;' .
+run_perl(prog => 'use threads 2.09;' .
'sub a{threads->create(shift)} $t = a sub{};' .
'$t->tid; $t->join; $t->tid',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
--
2.8.1
|
From @jkeenanOn Fri May 20 12:04:14 2016, jdhedden@cpan.org wrote:
Thanks, applied to blead in commit 5ea3460. -- |
The RT System itself - Status changed from 'new' to 'open' |
@jkeenan - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#128197 (status was 'resolved')
Searchable as RT128197$
The text was updated successfully, but these errors were encountered: