Compare commits
No commits in common. 'c9' and 'c8-stream-5.24' have entirely different histories.
c9
...
c8-stream-
@ -1,82 +0,0 @@
|
||||
From a0eaa97e59b5b2ad8e2a83f8509da3787ff4b4bf Mon Sep 17 00:00:00 2001
|
||||
From: Jitka Plesnikova <jplesnik@redhat.com>
|
||||
Date: Thu, 24 May 2018 11:32:01 +0200
|
||||
Subject: [PATCH] Upgrade to 2.22
|
||||
|
||||
---
|
||||
lib/threads.pm | 29 ++++++++++++++++++++++++++++-
|
||||
threads.xs | 4 ++++
|
||||
2 files changed, 32 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/threads.pm b/lib/threads.pm
|
||||
index 2eb926a..1b99567 100644
|
||||
--- a/lib/threads.pm
|
||||
+++ b/lib/threads.pm
|
||||
@@ -5,7 +5,7 @@ use 5.008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
-our $VERSION = '2.21'; # remember to update version in POD!
|
||||
+our $VERSION = '2.22'; # remember to update version in POD!
|
||||
my $XS_VERSION = $VERSION;
|
||||
$VERSION = eval $VERSION;
|
||||
|
||||
@@ -937,6 +937,33 @@ C<chdir()>) will affect all the threads in the application.
|
||||
On MSWin32, each thread maintains its own the current working directory
|
||||
setting.
|
||||
|
||||
+=item Locales
|
||||
+
|
||||
+Prior to Perl 5.28, locales could not be used with threads, due to various
|
||||
+race conditions. Starting in that release, on systems that implement
|
||||
+thread-safe locale functions, threads can be used, with some caveats.
|
||||
+This includes Windows starting with Visual Studio 2005, and systems compatible
|
||||
+with POSIX 2008. See L<perllocale/Multi-threaded operation>.
|
||||
+
|
||||
+Each thread (except the main thread) is started using the C locale. The main
|
||||
+thread is started like all other Perl programs; see L<perllocale/ENVIRONMENT>.
|
||||
+You can switch locales in any thread as often as you like.
|
||||
+
|
||||
+If you want to inherit the parent thread's locale, you can, in the parent, set
|
||||
+a variable like so:
|
||||
+
|
||||
+ $foo = POSIX::setlocale(LC_ALL, NULL);
|
||||
+
|
||||
+and then pass to threads->create() a sub that closes over C<$foo>. Then, in
|
||||
+the child, you say
|
||||
+
|
||||
+ POSIX::setlocale(LC_ALL, $foo);
|
||||
+
|
||||
+Or you can use the facilities in L<threads::shared> to pass C<$foo>;
|
||||
+or if the environment hasn't changed, in the child, do
|
||||
+
|
||||
+ POSIX::setlocale(LC_ALL, "");
|
||||
+
|
||||
=item Environment variables
|
||||
|
||||
Currently, on all platforms except MSWin32, all I<system> calls (e.g., using
|
||||
diff --git a/threads.xs b/threads.xs
|
||||
index 4e9e31f..3da9165 100644
|
||||
--- a/threads.xs
|
||||
+++ b/threads.xs
|
||||
@@ -580,6 +580,8 @@ S_ithread_run(void * arg)
|
||||
S_set_sigmask(&thread->initial_sigmask);
|
||||
#endif
|
||||
|
||||
+ thread_locale_init();
|
||||
+
|
||||
PL_perl_destruct_level = 2;
|
||||
|
||||
{
|
||||
@@ -665,6 +667,8 @@ S_ithread_run(void * arg)
|
||||
MUTEX_UNLOCK(&thread->mutex);
|
||||
MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);
|
||||
|
||||
+ thread_locale_term();
|
||||
+
|
||||
/* Exit application if required */
|
||||
if (exit_app) {
|
||||
(void)S_jmpenv_run(aTHX_ 2, thread, NULL, &exit_app, &exit_code);
|
||||
--
|
||||
2.14.3
|
||||
|
@ -1,103 +0,0 @@
|
||||
From 0bb2d0b00e011f1d77d1766fac4777c6bc376af7 Mon Sep 17 00:00:00 2001
|
||||
From: Jitka Plesnikova <jplesnik@redhat.com>
|
||||
Date: Mon, 1 Jun 2020 13:23:16 +0200
|
||||
Subject: [PATCH] Upgrade to 2.25
|
||||
|
||||
---
|
||||
lib/threads.pm | 22 +++++++++++-----------
|
||||
threads.xs | 2 +-
|
||||
2 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/lib/threads.pm b/lib/threads.pm
|
||||
index 1b99567..ee201a2 100644
|
||||
--- a/lib/threads.pm
|
||||
+++ b/lib/threads.pm
|
||||
@@ -5,7 +5,7 @@ use 5.008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
-our $VERSION = '2.22'; # remember to update version in POD!
|
||||
+our $VERSION = '2.25'; # remember to update version in POD!
|
||||
my $XS_VERSION = $VERSION;
|
||||
$VERSION = eval $VERSION;
|
||||
|
||||
@@ -134,13 +134,13 @@ threads - Perl interpreter-based threads
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
-This document describes threads version 2.21
|
||||
+This document describes threads version 2.25
|
||||
|
||||
=head1 WARNING
|
||||
|
||||
The "interpreter-based threads" provided by Perl are not the fast, lightweight
|
||||
system for multitasking that one might expect or hope for. Threads are
|
||||
-implemented in a way that make them easy to misuse. Few people know how to
|
||||
+implemented in a way that makes them easy to misuse. Few people know how to
|
||||
use them correctly or will be able to provide help.
|
||||
|
||||
The use of interpreter-based threads in perl is officially
|
||||
@@ -914,7 +914,7 @@ C<-E<gt>import()>) after any threads are started, and in such a way that no
|
||||
other 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.
|
||||
+a bug report on L<https://rt.cpan.org/Public/> against the problematic module.
|
||||
|
||||
=item Memory consumption
|
||||
|
||||
@@ -1090,7 +1090,7 @@ determine whether your system supports it.
|
||||
|
||||
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>
|
||||
+L<[perl #75154]|https://rt.perl.org/rt3/Public/Bug/Display.html?id=75154>
|
||||
|
||||
=item Detached threads and global destruction
|
||||
|
||||
@@ -1118,8 +1118,8 @@ unreferenced scalars. However, such warnings are harmless, and may safely be
|
||||
ignored.
|
||||
|
||||
You can search for L<threads> related bug reports at
|
||||
-L<http://rt.cpan.org/Public/>. If needed submit any new bugs, problems,
|
||||
-patches, etc. to: L<http://rt.cpan.org/Public/Dist/Display.html?Name=threads>
|
||||
+L<https://rt.cpan.org/Public/>. If needed submit any new bugs, problems,
|
||||
+patches, etc. to: L<https://rt.cpan.org/Public/Dist/Display.html?Name=threads>
|
||||
|
||||
=back
|
||||
|
||||
@@ -1137,14 +1137,14 @@ L<https://github.com/Dual-Life/threads>
|
||||
|
||||
L<threads::shared>, L<perlthrtut>
|
||||
|
||||
-L<http://www.perl.com/pub/a/2002/06/11/threads.html> and
|
||||
-L<http://www.perl.com/pub/a/2002/09/04/threads.html>
|
||||
+L<https://www.perl.com/pub/a/2002/06/11/threads.html> and
|
||||
+L<https://www.perl.com/pub/a/2002/09/04/threads.html>
|
||||
|
||||
Perl threads mailing list:
|
||||
-L<http://lists.perl.org/list/ithreads.html>
|
||||
+L<https://lists.perl.org/list/ithreads.html>
|
||||
|
||||
Stack size discussion:
|
||||
-L<http://www.perlmonks.org/?node_id=532956>
|
||||
+L<https://www.perlmonks.org/?node_id=532956>
|
||||
|
||||
Sample code in the I<examples> directory of this distribution on CPAN.
|
||||
|
||||
diff --git a/threads.xs b/threads.xs
|
||||
index 3da9165..ab64dc0 100644
|
||||
--- a/threads.xs
|
||||
+++ b/threads.xs
|
||||
@@ -676,7 +676,7 @@ S_ithread_run(void * arg)
|
||||
}
|
||||
|
||||
/* At this point, the interpreter may have been freed, so call
|
||||
- * free in the the context of of the 'main' interpreter which
|
||||
+ * free in the context of the 'main' interpreter which
|
||||
* can't have been freed due to the veto_cleanup mechanism.
|
||||
*/
|
||||
aTHX = MY_POOL.main_thread.interp;
|
||||
--
|
||||
2.25.4
|
||||
|
Loading…
Reference in new issue