In perl.git, the branch jkeenan/threads has been updated <http://perl5.git.perl.org/perl.git/commitdiff/f566343249618427131b73615909df934030adc1?hp=e1dd58b598e901fe1c94bfb28d600fd6e734051f>
discards e1dd58b598e901fe1c94bfb28d600fd6e734051f (commit) - Log ----------------------------------------------------------------- commit f566343249618427131b73615909df934030adc1 Author: jdhedden <[email protected]> Date: Sat Dec 31 12:51:35 2016 -0500 Upgrade to threads 2.12 For: RT # 130469 ----------------------------------------------------------------------- Summary of changes: Porting/Maintainers.pl | 2 +- dist/threads/lib/threads.pm | 4 ++-- dist/threads/t/exit.t | 10 +++++----- dist/threads/t/thread.t | 2 +- dist/threads/threads.xs | 18 +++++++++--------- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 8576b4032e..2b72707d4a 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1245,7 +1245,7 @@ use File::Glob qw(:case); }, 'threads' => { - 'DISTRIBUTION' => 'JDHEDDEN/threads-2.11.tar.gz', + 'DISTRIBUTION' => 'JDHEDDEN/threads-2.12.tar.gz', 'FILES' => q[dist/threads], 'EXCLUDED' => [ qr{^examples/}, diff --git a/dist/threads/lib/threads.pm b/dist/threads/lib/threads.pm index 46bd27afc7..14bf92040f 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.11'; +our $VERSION = '2.12'; my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -134,7 +134,7 @@ threads - Perl interpreter-based threads =head1 VERSION -This document describes threads version 2.11 +This document describes threads version 2.12 =head1 WARNING diff --git a/dist/threads/t/exit.t b/dist/threads/t/exit.t index 67b74c30fe..c50bf98e4d 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.11;' . +run_perl(prog => 'use threads 2.12;' . '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.11 qw(exit thread_only);' . +run_perl(prog => 'use threads 2.12 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.11 qw(exit thread_only);' . is($?>>8, 86, "'use threads 'exit' => 'thread_only'"); } -my $out = run_perl(prog => 'use threads 2.11;' . +my $out = run_perl(prog => 'use threads 2.12;' . 'threads->create(sub {' . ' exit(99);' . '});' . @@ -124,7 +124,7 @@ my $out = run_perl(prog => 'use threads 2.11;' . like($out, qr/1 finished and unjoined/, "exit(status) in thread"); -$out = run_perl(prog => 'use threads 2.11 qw(exit thread_only);' . +$out = run_perl(prog => 'use threads 2.12 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.11 qw(exit thread_only);' . like($out, qr/1 finished and unjoined/, "set_thread_exit_only(0)"); -run_perl(prog => 'use threads 2.11;' . +run_perl(prog => 'use threads 2.12;' . 'threads->create(sub {' . ' $SIG{__WARN__} = sub { exit(99); };' . ' die();' . diff --git a/dist/threads/t/thread.t b/dist/threads/t/thread.t index 58fc9c0ced..466fb13b1b 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.11;' . +run_perl(prog => 'use threads 2.12;' . 'sub a{threads->create(shift)} $t = a sub{};' . '$t->tid; $t->join; $t->tid', nolib => ($ENV{PERL_CORE}) ? 0 : 1, diff --git a/dist/threads/threads.xs b/dist/threads/threads.xs index 3842ffd851..579fff37a8 100644 --- a/dist/threads/threads.xs +++ b/dist/threads/threads.xs @@ -1085,16 +1085,16 @@ ithread_create(...) if (specs) { SV **svp; /* stack_size */ - if ((svp = hv_fetch(specs, "stack", 5, 0))) { + if ((svp = hv_fetchs(specs, "stack", 0))) { stack_size = SvIV(*svp); - } else if ((svp = hv_fetch(specs, "stacksize", 9, 0))) { + } else if ((svp = hv_fetchs(specs, "stacksize", 0))) { stack_size = SvIV(*svp); - } else if ((svp = hv_fetch(specs, "stack_size", 10, 0))) { + } else if ((svp = hv_fetchs(specs, "stack_size", 0))) { stack_size = SvIV(*svp); } /* context */ - if ((svp = hv_fetch(specs, "context", 7, 0))) { + if ((svp = hv_fetchs(specs, "context", 0))) { str = (char *)SvPV_nolen(*svp); switch (*str) { case 'a': @@ -1114,26 +1114,26 @@ ithread_create(...) default: Perl_croak(aTHX_ "Invalid context: %s", str); } - } else if ((svp = hv_fetch(specs, "array", 5, 0))) { + } else if ((svp = hv_fetchs(specs, "array", 0))) { if (SvTRUE(*svp)) { context = G_ARRAY; } - } else if ((svp = hv_fetch(specs, "list", 4, 0))) { + } else if ((svp = hv_fetchs(specs, "list", 0))) { if (SvTRUE(*svp)) { context = G_ARRAY; } - } else if ((svp = hv_fetch(specs, "scalar", 6, 0))) { + } else if ((svp = hv_fetchs(specs, "scalar", 0))) { if (SvTRUE(*svp)) { context = G_SCALAR; } - } else if ((svp = hv_fetch(specs, "void", 4, 0))) { + } else if ((svp = hv_fetchs(specs, "void", 0))) { if (SvTRUE(*svp)) { context = G_VOID; } } /* exit => thread_only */ - if ((svp = hv_fetch(specs, "exit", 4, 0))) { + if ((svp = hv_fetchs(specs, "exit", 0))) { str = (char *)SvPV_nolen(*svp); exit_opt = (*str == 't' || *str == 'T') ? PERL_ITHR_THREAD_EXIT_ONLY : 0; -- Perl5 Master Repository
