In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/afb37b32bf888f994cadff841e1e40f73c4a3cc7?hp=9270a63125f4fc3e15263d9e3c2a84c327aebb87>
- Log ----------------------------------------------------------------- commit afb37b32bf888f994cadff841e1e40f73c4a3cc7 Author: Jerry D. Hedden <[email protected]> Date: Fri Sep 27 14:36:15 2013 -0400 Upgrade to threads 1.88 ----------------------------------------------------------------------- Summary of changes: dist/threads/lib/threads.pm | 18 +++++++++--------- dist/threads/t/exit.t | 10 +++++----- dist/threads/t/thread.t | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dist/threads/lib/threads.pm b/dist/threads/lib/threads.pm index cff41c0..f2517be 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 = '1.88'; +our $VERSION = '1.89'; my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -134,7 +134,7 @@ threads - Perl interpreter-based threads =head1 VERSION -This document describes threads version 1.88 +This document describes threads version 1.89 =head1 SYNOPSIS @@ -424,12 +424,12 @@ C<$@> associated with the thread's execution status in its C<eval> context. =item $thr->_handle() -This I<private> method returns the memory location of the internal thread -structure associated with a threads object. For Win32, this is a pointer to -the C<HANDLE> value returned by C<CreateThread> (i.e., C<HANDLE *>); for other -platforms, it is a pointer to the C<pthread_t> structure used in the -C<pthread_create> call (i.e., C<pthread_t *>). The pointer is numeric (UV) and -not packed. It can not be direct passed to C<unpack('P[4]', >. +This I<private> method returns a pointer (i.e., the memory location expressed +as an unsigned integer) to the internal thread structure associated with a +threads object. For Win32, this is a pointer to the C<HANDLE> value returned +by C<CreateThread> (i.e., C<HANDLE *>); for other platforms, it is a pointer +to the C<pthread_t> structure used in the C<pthread_create> call (i.e., +C<pthread_t *>). This method is of no use for general Perl threads programming. Its intent is to provide other (XS-based) thread modules with the capability to access, and @@ -952,7 +952,7 @@ alarms in threads, set up a signal handler in the main thread, and then use L</"THREAD SIGNALLING"> to relay the signal to the thread: # Create thread with a task that may time out - my $thr->create(sub { + my $thr = threads->create(sub { threads->yield(); eval { $SIG{ALRM} = sub { die("Timeout\n"); }; diff --git a/dist/threads/t/exit.t b/dist/threads/t/exit.t index 33a3ec0..4020254 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 1.87;' . +run_perl(prog => 'use threads 1.89;' . '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 1.87 qw(exit thread_only);' . +run_perl(prog => 'use threads 1.89 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 1.87 qw(exit thread_only);' . is($?>>8, 86, "'use threads 'exit' => 'thread_only'"); } -my $out = run_perl(prog => 'use threads 1.87;' . +my $out = run_perl(prog => 'use threads 1.89;' . 'threads->create(sub {' . ' exit(99);' . '});' . @@ -124,7 +124,7 @@ my $out = run_perl(prog => 'use threads 1.87;' . like($out, '1 finished and unjoined', "exit(status) in thread"); -$out = run_perl(prog => 'use threads 1.87 qw(exit thread_only);' . +$out = run_perl(prog => 'use threads 1.89 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 1.87 qw(exit thread_only);' . like($out, '1 finished and unjoined', "set_thread_exit_only(0)"); -run_perl(prog => 'use threads 1.87;' . +run_perl(prog => 'use threads 1.89;' . 'threads->create(sub {' . ' $SIG{__WARN__} = sub { exit(99); };' . ' die();' . diff --git a/dist/threads/t/thread.t b/dist/threads/t/thread.t index 2d0a97a..84faf74 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 1.87;' . +run_perl(prog => 'use threads 1.89;' . 'sub a{threads->create(shift)} $t = a sub{};' . '$t->tid; $t->join; $t->tid', nolib => ($ENV{PERL_CORE}) ? 0 : 1, -- Perl5 Master Repository
