diff options
author | jdhedden <jdhedden@cpan.org> | 2016-05-20 14:33:31 -0400 |
---|---|---|
committer | James E Keenan <jkeenan@cpan.org> | 2016-05-20 22:04:14 -0400 |
commit | 89e2fe5204324fa39466f06895daa50e855dd629 (patch) | |
tree | 325bc41411823c60952d0457b30a7dbd008c7eab /dist/Thread-Queue | |
parent | 47011d98d8138b193bac04ac39d25acbe9b579ba (diff) | |
download | perl-89e2fe5204324fa39466f06895daa50e855dd629.tar.gz |
Upgrade to Thread::Queue 3.11
For: RT #128195
Diffstat (limited to 'dist/Thread-Queue')
-rw-r--r-- | dist/Thread-Queue/lib/Thread/Queue.pm | 11 | ||||
-rw-r--r-- | dist/Thread-Queue/t/07_lock.t | 7 |
2 files changed, 11 insertions, 7 deletions
diff --git a/dist/Thread-Queue/lib/Thread/Queue.pm b/dist/Thread-Queue/lib/Thread/Queue.pm index 2f87eed9c7..9f896b72ea 100644 --- a/dist/Thread-Queue/lib/Thread/Queue.pm +++ b/dist/Thread-Queue/lib/Thread/Queue.pm @@ -3,7 +3,7 @@ package Thread::Queue; use strict; use warnings; -our $VERSION = '3.09'; +our $VERSION = '3.11'; $VERSION = eval $VERSION; use threads::shared 1.21; @@ -304,7 +304,7 @@ Thread::Queue - Thread-safe queues =head1 VERSION -This document describes Thread::Queue version 3.09 +This document describes Thread::Queue version 3.11 =head1 SYNOPSIS @@ -618,8 +618,11 @@ Passing array/hash refs that contain objects may not work for Perl prior to =head1 SEE ALSO -Thread::Queue Discussion Forum on CPAN: -L<http://www.cpanforum.com/dist/Thread-Queue> +Thread::Queue on MetaCPAN: +L<https://metacpan.org/release/Thread-Queue> + +Code repository for CPAN distribution: +L<https://github.com/Dual-Life/Thread-Queue> L<threads>, L<threads::shared> diff --git a/dist/Thread-Queue/t/07_lock.t b/dist/Thread-Queue/t/07_lock.t index f9e258e092..b20e0604ca 100644 --- a/dist/Thread-Queue/t/07_lock.t +++ b/dist/Thread-Queue/t/07_lock.t @@ -29,7 +29,7 @@ ok($q, 'New queue'); my $sm = Thread::Semaphore->new(0); my $st = Thread::Semaphore->new(0); -threads->create(sub { +my $thr = threads->create(sub { { lock($q); $sm->up(); @@ -39,13 +39,14 @@ threads->create(sub { my @x = $q->extract(5,2); is_deeply(\@x, [6,7], 'Thread dequeues under lock'); } -})->detach(); +}); $sm->down(); $st->up(); my @x = $q->dequeue_nb(100); is_deeply(\@x, [1..5,8..10], 'Main dequeues'); -threads::yield(); + +$thr->join(); exit(0); |