File tree 3 files changed +12
-8
lines changed 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -1153,7 +1153,7 @@ package Maintainers;
1153
1153
# correct for this (and Thread::Semaphore, threads, and threads::shared)
1154
1154
# to be under dist/ rather than cpan/
1155
1155
' Thread::Queue' => {
1156
- ' DISTRIBUTION' => ' JDHEDDEN/Thread-Queue-3.09 .tar.gz' ,
1156
+ ' DISTRIBUTION' => ' JDHEDDEN/Thread-Queue-3.11 .tar.gz' ,
1157
1157
' FILES' => q[ dist/Thread-Queue] ,
1158
1158
' EXCLUDED' => [
1159
1159
qr { ^examples/} ,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package Thread::Queue;
3
3
use strict;
4
4
use warnings;
5
5
6
- our $VERSION = ' 3.09 ' ;
6
+ our $VERSION = ' 3.11 ' ;
7
7
$VERSION = eval $VERSION ;
8
8
9
9
use threads::shared 1.21;
@@ -304,7 +304,7 @@ Thread::Queue - Thread-safe queues
304
304
305
305
=head1 VERSION
306
306
307
- This document describes Thread::Queue version 3.09
307
+ This document describes Thread::Queue version 3.11
308
308
309
309
=head1 SYNOPSIS
310
310
@@ -618,8 +618,11 @@ Passing array/hash refs that contain objects may not work for Perl prior to
618
618
619
619
=head1 SEE ALSO
620
620
621
- Thread::Queue Discussion Forum on CPAN:
622
- L<http://www.cpanforum.com/dist/Thread-Queue>
621
+ Thread::Queue on MetaCPAN:
622
+ L<https://metacpan.org/release/Thread-Queue>
623
+
624
+ Code repository for CPAN distribution:
625
+ L<https://github.com/Dual-Life/Thread-Queue>
623
626
624
627
L<threads> , L<threads::shared>
625
628
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ ok($q, 'New queue');
29
29
my $sm = Thread::Semaphore-> new(0);
30
30
my $st = Thread::Semaphore-> new(0);
31
31
32
- threads-> create(sub {
32
+ my $thr = threads-> create(sub {
33
33
{
34
34
lock($q );
35
35
$sm -> up();
@@ -39,13 +39,14 @@ threads->create(sub {
39
39
my @x = $q -> extract(5,2);
40
40
is_deeply(\@x , [6,7], ' Thread dequeues under lock' );
41
41
}
42
- })-> detach() ;
42
+ });
43
43
44
44
$sm -> down();
45
45
$st -> up();
46
46
my @x = $q -> dequeue_nb(100);
47
47
is_deeply(\@x , [1..5,8..10], ' Main dequeues' );
48
- threads::yield();
48
+
49
+ $thr -> join ();
49
50
50
51
exit (0);
51
52
You can’t perform that action at this time.
0 commit comments