This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
better pod for threads::_handle
authorDaniel Dragan <bulk88@hotmail.com>
Thu, 26 Sep 2013 08:39:55 +0000 (04:39 -0400)
committerJames E Keenan <jkeenan@cpan.org>
Fri, 27 Sep 2013 23:13:05 +0000 (01:13 +0200)
First time I tried to get the OS handle I wrote

unpack('P[Q || L /*PICK ONE*/]', $thread->_handle())

it crashed because _handle returns a number, not a packed string. unpack
wants a packed string. Mention the pointer is numeric and not to ever pass
the retval to unpack('P[.

Porting/Maintainers.pl
dist/threads/lib/threads.pm

index a935031..83015b9 100755 (executable)
@@ -1854,7 +1854,7 @@ use File::Glob qw(:case);
 
     'threads' => {
         'MAINTAINER'   => 'jdhedden',
 
     'threads' => {
         'MAINTAINER'   => 'jdhedden',
-        'DISTRIBUTION' => 'JDHEDDEN/threads-1.87.tar.gz',
+        'DISTRIBUTION' => 'JDHEDDEN/threads-1.88.tar.gz',
         'FILES'        => q[dist/threads],
         'EXCLUDED'     => [
             qr{^examples/},
         'FILES'        => q[dist/threads],
         'EXCLUDED'     => [
             qr{^examples/},
index 4addf9c..cff41c0 100644 (file)
@@ -5,7 +5,7 @@ use 5.008;
 use strict;
 use warnings;
 
 use strict;
 use warnings;
 
-our $VERSION = '1.87';
+our $VERSION = '1.88';
 my $XS_VERSION = $VERSION;
 $VERSION = eval $VERSION;
 
 my $XS_VERSION = $VERSION;
 $VERSION = eval $VERSION;
 
@@ -134,7 +134,7 @@ threads - Perl interpreter-based threads
 
 =head1 VERSION
 
 
 =head1 VERSION
 
-This document describes threads version 1.87
+This document describes threads version 1.88
 
 =head1 SYNOPSIS
 
 
 =head1 SYNOPSIS
 
@@ -428,7 +428,8 @@ 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
 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 *>).
+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 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
 
 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