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.08 #15290
Comments
From @jdheddenCreated by @jdheddenThe attached patch upgrades the 'Thread-Queue' module to v3.08. The main purpose of this patch is to sync blead and CPAN in The patch does not contain any functional changes. This patch is in response to: Perl Info
|
From @jdhedden0001-Upgrade-to-Thread-Queue-3.08.patchFrom 09d432c92d45914a2b1b885ede2f7ad669551993 Mon Sep 17 00:00:00 2001
From: jdhedden <jdhedden@cpan.org>
Date: Fri, 22 Apr 2016 16:13:10 -0400
Subject: [PATCH] Upgrade to Thread::Queue 3.08
---
Porting/Maintainers.pl | 2 +-
dist/Thread-Queue/lib/Thread/Queue.pm | 52 +++++++++++++++++------------------
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index d861ccb..d2813a6 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1163,7 +1163,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.07.tar.gz',
+ 'DISTRIBUTION' => 'JDHEDDEN/Thread-Queue-3.08.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 f1a08c7..1ca6197 100644
--- a/dist/Thread-Queue/lib/Thread/Queue.pm
+++ b/dist/Thread-Queue/lib/Thread/Queue.pm
@@ -304,7 +304,7 @@ Thread::Queue - Thread-safe queues
=head1 VERSION
-This document describes Thread::Queue version 3.07
+This document describes Thread::Queue version 3.08
=head1 SYNOPSIS
@@ -393,20 +393,20 @@ shared array reference via C<&shared([])>, copy the elements 'foo', 'bar'
and 'baz' from C<@ary> into it, and then place that shared reference onto
the queue:
- my @ary = qw/foo bar baz/;
- $q->enqueue(\@ary);
+ my @ary = qw/foo bar baz/;
+ $q->enqueue(\@ary);
However, for the following, the items are already shared, so their references
are added directly to the queue, and no cloning takes place:
- my @ary :shared = qw/foo bar baz/;
- $q->enqueue(\@ary);
+ my @ary :shared = qw/foo bar baz/;
+ $q->enqueue(\@ary);
- my $obj = &shared({});
- $$obj{'foo'} = 'bar';
- $$obj{'qux'} = 99;
- bless($obj, 'My::Class');
- $q->enqueue($obj);
+ my $obj = &shared({});
+ $$obj{'foo'} = 'bar';
+ $$obj{'qux'} = 99;
+ bless($obj, 'My::Class');
+ $q->enqueue($obj);
See L</"LIMITATIONS"> for caveats related to passing objects via queues.
@@ -546,18 +546,18 @@ Adds the list of items to the queue at the specified index position (0
is the head of the list). Any existing items at and beyond that position are
pushed back past the newly added items:
- $q->enqueue(1, 2, 3, 4);
- $q->insert(1, qw/foo bar/);
- # Queue now contains: 1, foo, bar, 2, 3, 4
+ $q->enqueue(1, 2, 3, 4);
+ $q->insert(1, qw/foo bar/);
+ # Queue now contains: 1, foo, bar, 2, 3, 4
Specifying an index position greater than the number of items in the queue
just adds the list to the end.
Negative index positions are supported:
- $q->enqueue(1, 2, 3, 4);
- $q->insert(-2, qw/foo bar/);
- # Queue now contains: 1, 2, foo, bar, 3, 4
+ $q->enqueue(1, 2, 3, 4);
+ $q->insert(-2, qw/foo bar/);
+ # Queue now contains: 1, 2, foo, bar, 3, 4
Specifying a negative index position greater than the number of items in the
queue adds the list to the head of the queue.
@@ -575,18 +575,18 @@ called with no arguments, C<extract> operates the same as C<dequeue_nb>.
This method is non-blocking, and will return only as many items as are
available to fulfill the request:
- $q->enqueue(1, 2, 3, 4);
- my $item = $q->extract(2) # Returns 3
- # Queue now contains: 1, 2, 4
- my @items = $q->extract(1, 3) # Returns (2, 4)
- # Queue now contains: 1
+ $q->enqueue(1, 2, 3, 4);
+ my $item = $q->extract(2) # Returns 3
+ # Queue now contains: 1, 2, 4
+ my @items = $q->extract(1, 3) # Returns (2, 4)
+ # Queue now contains: 1
Specifying an index position greater than the number of items in the
queue results in C<undef> or an empty list being returned.
- $q->enqueue('foo');
- my $nada = $q->extract(3) # Returns undef
- my @nada = $q->extract(1, 3) # Returns ()
+ $q->enqueue('foo');
+ my $nada = $q->extract(3) # Returns undef
+ my @nada = $q->extract(1, 3) # Returns ()
Negative index positions are supported. Specifying a negative index position
greater than the number of items in the queue may return items from the head
@@ -598,8 +598,8 @@ greater than zero):
my @nada = $q->extract(-6, 2); # Returns () - (3+(-6)+2) <= 0
my @some = $q->extract(-6, 4); # Returns (foo) - (3+(-6)+4) > 0
# Queue now contains: bar, baz
- my @rest = $q->extract(-3, 4); # Returns
- # (bar, baz) - (2+(-3)+4) > 0
+ my @rest = $q->extract(-3, 4); # Returns (bar, baz) -
+ # (2+(-3)+4) > 0
=back
--
2.8.1
|
From @rjbsThanks. I have applied this, but to satisfy porting tests, the version has been bumped to v3.09. I hope not to make any further changes in blead before v5.24.0, due any day now. -- |
The RT System itself - Status changed from 'new' to 'open' |
@rjbs - Status changed from 'open' to 'resolved' |
From @jdheddenArgh! I'm trying to release the same versions to CPAN as will be On Sat, Apr 30, 2016 at 3:09 PM, Ricardo SIGNES via RT <
|
From @jdhedden0001-Bump-versions.patchFrom 8d2e11fa3e779c3107ab82e1132a098120e334c6 Mon Sep 17 00:00:00 2001
From: jdhedden <jdhedden@cpan.org>
Date: Sat, 30 Apr 2016 17:25:44 -0400
Subject: [PATCH] Bump versions
---
Porting/Maintainers.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 7009713..d4566ad 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1163,7 +1163,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.08.tar.gz',
+ 'DISTRIBUTION' => 'JDHEDDEN/Thread-Queue-3.09.tar.gz',
'FILES' => q[dist/Thread-Queue],
'EXCLUDED' => [
qr{^examples/},
@@ -1187,7 +1187,7 @@ use File::Glob qw(:case);
},
'threads' => {
- 'DISTRIBUTION' => 'JDHEDDEN/threads-2.06.tar.gz',
+ 'DISTRIBUTION' => 'JDHEDDEN/threads-2.07.tar.gz',
'FILES' => q[dist/threads],
'EXCLUDED' => [
qr{^examples/},
--
2.8.1
|
From @cpansproutOn Sat Apr 30 12:09:00 2016, rjbs wrote:
I hope you can wait until #127999 is resolved before making the release. I have a patch which I will push for smoking soon. -- Father Chrysostomos |
From @rjbs* "Jerry D. Hedden" <jdhedden@cpan.org> [2016-04-30T17:30:06]
Thanks, applied as 6d08d01. -- |
Migrated from rt.perl.org#127964 (status was 'resolved')
Searchable as RT127964$
The text was updated successfully, but these errors were encountered: