Skip to content

Commit

Permalink
Thread-Suspend v1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhedden committed Apr 21, 2016
1 parent d19eb3f commit 99248e2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 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.17 Thu Feb 28 16:05:15 2008
- More fixes to tests

1.16 Wed Feb 27 17:43: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.16
Thread::Suspend version 1.17
============================

This module adds suspend and resume operations for threads.
Expand Down
6 changes: 3 additions & 3 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.16';
our $VERSION = '1.17';

use threads 1.39;
use threads::shared 1.01;
Expand Down Expand Up @@ -155,7 +155,7 @@ Thread::Suspend - Suspend and resume operations for threads
=head1 VERSION
This document describes Thread::Suspend version 1.16
This document describes Thread::Suspend version 1.17
=head1 SYNOPSIS
Expand Down Expand Up @@ -316,7 +316,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.16/lib/Thread/Suspend.pm>
L<http://annocpan.org/~JDHEDDEN/Thread-Suspend-1.17/lib/Thread/Suspend.pm>
Source repository:
L<http://code.google.com/p/thread-suspend/>
Expand Down
9 changes: 5 additions & 4 deletions t/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,28 @@ sub pause
}

sub check {
my ($thr, $running, $line) = @_;
my ($thr, $state, $line) = @_;
my $tid = $thr->tid();

pause(0.1);
delete($COUNTS{$tid});
if (exists($COUNTS{$tid})) {
ok(0, "BUG: \$COUNTS{$tid} not deleted");
}
$COUNTS{$tid} = $tid;

if ($running eq 'running') {
if ($state eq 'running') {
for (1..100) {
pause(0.1);
last if (! exists($COUNTS{$tid}));
}
ok(! exists($COUNTS{$tid}), "Thread $tid $running (see line $line)");
ok(! exists($COUNTS{$tid}), "Thread $tid $state (line $line)");
} else {
for (1..3) {
pause(0.1);
last if (! exists($COUNTS{$tid}));
}
ok(exists($COUNTS{$tid}), "Thread $tid $running (see line $line)");
ok(exists($COUNTS{$tid}), "Thread $tid $state (line $line)");
}
}

Expand Down

0 comments on commit 99248e2

Please sign in to comment.