New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PATCH] Upgrade to Thread::Queue 3.11 #15341
Comments
From @jdheddenThis is a bug report for perl from jdhedden@cpan.org, The attached patch upgrades 'Thread::Queue' to version 3.11. The patch removes the use of detached threads in tests per bug #114468: The patch does not contain any functional changes. Flags: Site configuration information for perl 5.22.2: Configured by Debian Project at Sat Apr 30 12:20:51 UTC 2016. Summary of my perl5 (revision 5 version 22 subversion 2) configuration: Locally applied patches: @INC for perl 5.22.2: Environment for perl 5.22.2: |
From @jdhedden0001-Upgrade-to-Thread-Queue-3.11.patchFrom e1e76562b079a156a353ac1d690b3dfd9f07012c Mon Sep 17 00:00:00 2001
From: jdhedden <jdhedden@cpan.org>
Date: Fri, 20 May 2016 14:33:31 -0400
Subject: [PATCH] Upgrade to Thread::Queue 3.11
---
Porting/Maintainers.pl | 2 +-
dist/Thread-Queue/lib/Thread/Queue.pm | 11 +++++++----
dist/Thread-Queue/t/07_lock.t | 7 ++++---
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 9905417..695f16d 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1153,7 +1153,7 @@ use File::Glob qw(:case);
# correct for this (and Thread::Semaphore, threads, and threads::shared)
# to be under dist/ rather than cpan/
'Thread::Queue' => {
- 'DISTRIBUTION' => 'JDHEDDEN/Thread-Queue-3.09.tar.gz',
+ 'DISTRIBUTION' => 'JDHEDDEN/Thread-Queue-3.11.tar.gz',
'FILES' => q[dist/Thread-Queue],
'EXCLUDED' => [
qr{^examples/},
diff --git a/dist/Thread-Queue/lib/Thread/Queue.pm b/dist/Thread-Queue/lib/Thread/Queue.pm
index 2f87eed..9f896b7 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 f9e258e..b20e060 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);
--
2.8.1
|
From @jkeenanOn Fri May 20 11:35:53 2016, jdhedden@cpan.org wrote:
Thanks, applied to blead in commit 89e2fe5.
-- |
The RT System itself - Status changed from 'new' to 'open' |
@jkeenan - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#128195 (status was 'resolved')
Searchable as RT128195$
The text was updated successfully, but these errors were encountered: