Skip to content

Commit

Permalink
threads 1.47
Browse files Browse the repository at this point in the history
From: "Jerry D. Hedden" <jdhedden@yahoo.com>
Message-ID: <20061031132626.18317.qmail@web30214.mail.mud.yahoo.com>

p4raw-id: //depot/perl@29171
  • Loading branch information
jdhedden authored and rgs committed Oct 31, 2006
1 parent 9b201d7 commit b5c80a2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 22 deletions.
4 changes: 4 additions & 0 deletions ext/threads/Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Revision history for Perl extension threads.

1.47 Mon Oct 30 16:02:53 EST 2006
- Fix t/thread.t crash under Win32
- Test multiple embedded Perl support

1.46 Fri Oct 27 19:51:48 EST 2006
- Support multiple embedded Perls
- Document workaround for non-threadsafe modules
Expand Down
2 changes: 1 addition & 1 deletion ext/threads/README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
threads version 1.46
threads version 1.47
====================

This module exposes interpreter threads to the Perl level.
Expand Down
10 changes: 5 additions & 5 deletions ext/threads/t/exit.t
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ my $rc = $thr->join();
ok(! defined($rc), 'Exited: threads->exit()');


run_perl(prog => 'use threads 1.37;' .
run_perl(prog => 'use threads 1.47;' .
'threads->exit(86);' .
'exit(99);',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
Expand Down Expand Up @@ -104,15 +104,15 @@ $rc = $thr->join();
ok(! defined($rc), 'Exited: $thr->set_thread_exit_only');


run_perl(prog => 'use threads 1.37 qw(exit thread_only);' .
run_perl(prog => 'use threads 1.47 qw(exit thread_only);' .
'threads->create(sub { exit(99); })->join();' .
'exit(86);',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
switches => ($ENV{PERL_CORE}) ? [] : [ '-Mblib' ]);
is($?>>8, 86, "'use threads 'exit' => 'thread_only'");


my $out = run_perl(prog => 'use threads 1.37;' .
my $out = run_perl(prog => 'use threads 1.47;' .
'threads->create(sub {' .
' exit(99);' .
'})->join();' .
Expand All @@ -124,7 +124,7 @@ is($?>>8, 99, "exit(status) in thread");
like($out, '1 finished and unjoined', "exit(status) in thread");


$out = run_perl(prog => 'use threads 1.37 qw(exit thread_only);' .
$out = run_perl(prog => 'use threads 1.47 qw(exit thread_only);' .
'threads->create(sub {' .
' threads->set_thread_exit_only(0);' .
' exit(99);' .
Expand All @@ -137,7 +137,7 @@ is($?>>8, 99, "set_thread_exit_only(0)");
like($out, '1 finished and unjoined', "set_thread_exit_only(0)");


run_perl(prog => 'use threads 1.37;' .
run_perl(prog => 'use threads 1.47;' .
'threads->create(sub {' .
' $SIG{__WARN__} = sub { exit(99); };' .
' die();' .
Expand Down
2 changes: 1 addition & 1 deletion ext/threads/t/stack.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ BEGIN {
print("1..18\n"); ### Number of tests that will be run ###
};

use threads 1.09 ('stack_size' => 32*4096);
use threads ('stack_size' => 32*4096);
ok(1, 1, 'Loaded');

### Start of Testing ###
Expand Down
2 changes: 1 addition & 1 deletion ext/threads/t/thread.t
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ package main;

# bugid #24165

run_perl(prog => 'use threads 1.46;' .
run_perl(prog => 'use threads 1.47;' .
'sub a{threads->create(shift)} $t = a sub{};' .
'$t->tid; $t->join; $t->tid',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
Expand Down
6 changes: 3 additions & 3 deletions ext/threads/threads.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use 5.008;
use strict;
use warnings;

our $VERSION = '1.46';
our $VERSION = '1.47';
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;

Expand Down Expand Up @@ -133,7 +133,7 @@ threads - Perl interpreter-based threads
=head1 VERSION
This document describes threads version 1.46
This document describes threads version 1.47
=head1 SYNOPSIS
Expand Down Expand Up @@ -938,7 +938,7 @@ L<threads> Discussion Forum on CPAN:
L<http://www.cpanforum.com/dist/threads>
Annotated POD for L<threads>:
L<http://annocpan.org/~JDHEDDEN/threads-1.46/threads.pm>
L<http://annocpan.org/~JDHEDDEN/threads-1.47/threads.pm>
L<threads::shared>, L<perlthrtut>
Expand Down
12 changes: 1 addition & 11 deletions ext/threads/threads.xs
Original file line number Diff line number Diff line change
Expand Up @@ -237,17 +237,7 @@ int
Perl_ithread_hook(pTHX)
{
dMY_POOL;

int veto_cleanup = 0;

if (aTHX == MY_POOL.main_thread.interp) {
veto_cleanup = S_exit_warning(aTHX);
if (! veto_cleanup) {
MUTEX_DESTROY(&MY_POOL.create_destruct_mutex);
}
}

return (veto_cleanup);
return ((aTHX == MY_POOL.main_thread.interp) ? S_exit_warning(aTHX) : 0);
}


Expand Down

0 comments on commit b5c80a2

Please sign in to comment.