Skip to content

Commit

Permalink
Thread-Suspend v1.06
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhedden committed Apr 21, 2016
1 parent 3fb0719 commit eb53fff
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 22 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.06 Thu Aug 10 14:51:07 EDT 2006
- More fixes to tests (sigh)

1.05 Wed Aug 2 13:54:17 EDT 2006
- 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.05
Thread::Suspend version 1.06
============================

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.05;
our $VERSION = 1.06;

use threads 1.36;
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.05
This document describes Thread::Suspend version 1.06
=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.05/lib/Thread/Suspend.pm>
L<http://annocpan.org/~JDHEDDEN/Thread-Suspend-1.06/lib/Thread/Suspend.pm>
L<threads>, L<threads::shared>
Expand Down
6 changes: 3 additions & 3 deletions t/00_basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ $SIG{'KILL'} = sub { threads->exit(); };
sub thr_func
{
my $tid = threads->tid();
while (1) {
$COUNTS{$tid}++;
while (++$COUNTS{$tid}) {
threads->yield();
}
}
Expand All @@ -34,8 +33,9 @@ sub check {
threads->yield();
$begin = $COUNTS{$tid};
} while (! $begin);
threads->yield();
threads->yield() for (1..3);
sleep(1);
threads->yield() for (1..3);
$end = $COUNTS{$tid};
} while (! $end);
if ($running eq 'running') {
Expand Down
6 changes: 3 additions & 3 deletions t/01_self.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ sub thr_func
my $tid = threads->tid();
$COUNTS{$tid} = 1;
threads->self()->suspend();
while (1) {
$COUNTS{$tid}++;
while (++$COUNTS{$tid}) {
threads->yield();
}
}
Expand All @@ -30,8 +29,9 @@ sub check {
threads->yield();
$begin = $COUNTS{$tid};
} while (! $begin);
threads->yield();
threads->yield() for (1..3);
sleep(1);
threads->yield() for (1..3);
$end = $COUNTS{$tid};
} while (! $end);
if ($running eq 'running') {
Expand Down
6 changes: 3 additions & 3 deletions t/02_signal.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ $SIG{'KILL'} = sub { threads->exit(); };
sub thr_func
{
my $tid = threads->tid();
while (1) {
$COUNTS{$tid}++;
while (++$COUNTS{$tid}) {
threads->yield();
}
}
Expand All @@ -31,8 +30,9 @@ sub check {
threads->yield();
$begin = $COUNTS{$tid};
} while (! $begin);
threads->yield() for (1..3);
sleep(1);
threads->yield();
threads->yield() for (1..3);
$end = $COUNTS{$tid};
} while (! $end);
if ($running eq 'running') {
Expand Down
6 changes: 3 additions & 3 deletions t/03_detach.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ $SIG{'KILL'} = sub {
sub thr_func
{
my $tid = threads->tid();
while (1) {
$COUNTS{$tid}++;
while (++$COUNTS{$tid}) {
threads->yield();
}
}
Expand All @@ -33,8 +32,9 @@ sub check {
threads->yield();
$begin = $COUNTS{$tid};
} while (! $begin);
threads->yield();
threads->yield() for (1..3);
sleep(1);
threads->yield() for (1..3);
$end = $COUNTS{$tid};
} while (! $end);
if ($running eq 'running') {
Expand Down
6 changes: 3 additions & 3 deletions t/04_all.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ $SIG{'KILL'} = sub {
sub thr_func
{
my $tid = threads->tid();
while (1) {
$COUNTS{$tid}++;
while (++$COUNTS{$tid}) {
threads->yield();
}
}
Expand All @@ -34,8 +33,9 @@ sub check {
threads->yield();
$begin = $COUNTS{$tid};
} while (! $begin);
threads->yield();
threads->yield() for (1..3);
sleep(1);
threads->yield() for (1..3);
$end = $COUNTS{$tid};
} while (! $end);
if ($running eq 'running') {
Expand Down
6 changes: 3 additions & 3 deletions t/05_some.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ $SIG{'KILL'} = sub {
sub thr_func
{
my $tid = threads->tid();
while (1) {
$COUNTS{$tid}++;
while (++$COUNTS{$tid}) {
threads->yield();
}
}
Expand All @@ -34,8 +33,9 @@ sub check {
threads->yield();
$begin = $COUNTS{$tid};
} while (! $begin);
threads->yield();
threads->yield() for (1..3);
sleep(1);
threads->yield() for (1..3);
$end = $COUNTS{$tid};
} while (! $end);
if ($running eq 'running') {
Expand Down

0 comments on commit eb53fff

Please sign in to comment.