Skip to content

Commit

Permalink
Thread-Suspend v1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhedden committed Apr 21, 2016
1 parent 99248e2 commit 8e87dcb
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Revision history for Perl extension Thread::Suspend.

1.18 Tue Jun 10 16:58:13 2008
- End all tests with exit(0)

1.17 Thu Feb 28 16:05:15 2008
- More fixes to tests

Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Thread::Suspend version 1.17
Thread::Suspend version 1.18
============================

This module adds suspend and resume operations for threads.
Expand Down
9 changes: 4 additions & 5 deletions lib/Thread/Suspend.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package Thread::Suspend; {
use strict;
use warnings;

our $VERSION = '1.17';
our $VERSION = '1.18';

use threads 1.39;
use threads::shared 1.01;
Expand Down Expand Up @@ -81,6 +81,7 @@ sub threads::resume
{
my ($thing, @threads) = @_;

lock(%SUSPEND);
if ($thing eq 'threads') {
if (@threads) {
# Resume specified threads
Expand All @@ -91,7 +92,6 @@ sub threads::resume
@threads;
} else {
# Resume all threads
lock(%SUSPEND);
@threads = grep { $_ }
map { threads->object($_) }
keys(%SUSPEND);
Expand All @@ -103,7 +103,6 @@ sub threads::resume

# Resume threads
my $resume = 0;
lock(%SUSPEND);
foreach my $thr (@threads) {
my $tid = $thr->tid();
if ($SUSPEND{$tid}) {
Expand Down Expand Up @@ -155,7 +154,7 @@ Thread::Suspend - Suspend and resume operations for threads
=head1 VERSION
This document describes Thread::Suspend version 1.17
This document describes Thread::Suspend version 1.18
=head1 SYNOPSIS
Expand Down Expand Up @@ -316,7 +315,7 @@ Thread::Suspend Discussion Forum on CPAN:
L<http://www.cpanforum.com/dist/Thread-Suspend>
Annotated POD for Thread::Suspend:
L<http://annocpan.org/~JDHEDDEN/Thread-Suspend-1.17/lib/Thread/Suspend.pm>
L<http://annocpan.org/~JDHEDDEN/Thread-Suspend-1.18/lib/Thread/Suspend.pm>
Source repository:
L<http://code.google.com/p/thread-suspend/>
Expand Down
2 changes: 2 additions & 0 deletions t/00_basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,6 @@ foreach my $thr (@threads) {

$_->kill('KILL')->join() foreach (@threads);

exit(0);

# EOF
2 changes: 2 additions & 0 deletions t/01_self.t
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,6 @@ while (my $thr = shift(@threads)) {
$thr->kill('KILL')->join();
}

exit(0);

# EOF
2 changes: 2 additions & 0 deletions t/02_signal.t
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,6 @@ SKIP: {
$thr->join();
}

exit(0);

# EOF
2 changes: 2 additions & 0 deletions t/03_detach.t
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,6 @@ foreach my $thr (@threads) {
}
}

exit(0);

# EOF
2 changes: 2 additions & 0 deletions t/04_all.t
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,6 @@ foreach my $thr (@threads) {
}
}

exit(0);

# EOF
2 changes: 2 additions & 0 deletions t/05_some.t
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,6 @@ foreach my $thr (@threads) {
}
}

exit(0);

# EOF
2 changes: 2 additions & 0 deletions t/99_pod.t
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ SKIP: {
unlink("/home/$ENV{'USER'}/en.prepl", "/home/$ENV{'USER'}/en.pws");
}

exit(0);

__DATA__
Hedden
Expand Down

0 comments on commit 8e87dcb

Please sign in to comment.