diff -Nru libfuture-queue-perl-0.51/.editorconfig libfuture-queue-perl-0.52/.editorconfig --- libfuture-queue-perl-0.51/.editorconfig 1970-01-01 00:00:00.000000000 +0000 +++ libfuture-queue-perl-0.52/.editorconfig 2024-01-03 12:07:36.000000000 +0000 @@ -0,0 +1,4 @@ +root = true + +[*.{pm,pl,t}] +indent_size = 3 diff -Nru libfuture-queue-perl-0.51/Build.PL libfuture-queue-perl-0.52/Build.PL --- libfuture-queue-perl-0.51/Build.PL 2023-02-08 14:05:46.000000000 +0000 +++ libfuture-queue-perl-0.52/Build.PL 2024-01-03 12:07:36.000000000 +0000 @@ -1,3 +1,4 @@ +use v5; use strict; use warnings; diff -Nru libfuture-queue-perl-0.51/Changes libfuture-queue-perl-0.52/Changes --- libfuture-queue-perl-0.51/Changes 2023-02-08 14:05:46.000000000 +0000 +++ libfuture-queue-perl-0.52/Changes 2024-01-03 12:07:36.000000000 +0000 @@ -1,5 +1,10 @@ Revision history for Future-Queue +0.52 2024-01-03 + [BUGFIXES] + * Avoid an infinite deep recursion on `_manage_push_waiters` + (RT151010) + 0.51 2023-02-08 [CHANGES] * Allow specifying a different class, prototype instance, or diff -Nru libfuture-queue-perl-0.51/LICENSE libfuture-queue-perl-0.52/LICENSE --- libfuture-queue-perl-0.51/LICENSE 2023-02-08 14:05:46.000000000 +0000 +++ libfuture-queue-perl-0.52/LICENSE 2024-01-03 12:07:36.000000000 +0000 @@ -1,4 +1,4 @@ -This software is copyright (c) 2023 by Paul Evans . +This software is copyright (c) 2024 by Paul Evans . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. @@ -12,7 +12,7 @@ --- The GNU General Public License, Version 1, February 1989 --- -This software is Copyright (c) 2023 by Paul Evans . +This software is Copyright (c) 2024 by Paul Evans . This is free software, licensed under: @@ -272,7 +272,7 @@ --- The Artistic License 1.0 --- -This software is Copyright (c) 2023 by Paul Evans . +This software is Copyright (c) 2024 by Paul Evans . This is free software, licensed under: diff -Nru libfuture-queue-perl-0.51/MANIFEST libfuture-queue-perl-0.52/MANIFEST --- libfuture-queue-perl-0.51/MANIFEST 2023-02-08 14:05:46.000000000 +0000 +++ libfuture-queue-perl-0.52/MANIFEST 2024-01-03 12:07:36.000000000 +0000 @@ -1,3 +1,4 @@ +.editorconfig Build.PL Changes lib/Future/Queue.pm diff -Nru libfuture-queue-perl-0.51/META.json libfuture-queue-perl-0.52/META.json --- libfuture-queue-perl-0.51/META.json 2023-02-08 14:05:46.000000000 +0000 +++ libfuture-queue-perl-0.52/META.json 2024-01-03 12:07:36.000000000 +0000 @@ -4,7 +4,7 @@ "Paul Evans " ], "dynamic_config" : 1, - "generated_by" : "Module::Build version 0.4231", + "generated_by" : "Module::Build version 0.4234", "license" : [ "perl_5" ], @@ -34,7 +34,7 @@ "provides" : { "Future::Queue" : { "file" : "lib/Future/Queue.pm", - "version" : "0.51" + "version" : "0.52" } }, "release_status" : "stable", @@ -43,6 +43,6 @@ "http://dev.perl.org/licenses/" ] }, - "version" : "0.51", + "version" : "0.52", "x_serialization_backend" : "JSON::PP version 4.07" } diff -Nru libfuture-queue-perl-0.51/META.yml libfuture-queue-perl-0.52/META.yml --- libfuture-queue-perl-0.51/META.yml 2023-02-08 14:05:46.000000000 +0000 +++ libfuture-queue-perl-0.52/META.yml 2024-01-03 12:07:36.000000000 +0000 @@ -7,7 +7,7 @@ configure_requires: Module::Build: '0.4004' dynamic_config: 1 -generated_by: 'Module::Build version 0.4231, CPAN::Meta::Converter version 2.150010' +generated_by: 'Module::Build version 0.4234, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -16,11 +16,11 @@ provides: Future::Queue: file: lib/Future/Queue.pm - version: '0.51' + version: '0.52' requires: Future: '0' perl: '5.014' resources: license: http://dev.perl.org/licenses/ -version: '0.51' +version: '0.52' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -Nru libfuture-queue-perl-0.51/debian/changelog libfuture-queue-perl-0.52/debian/changelog --- libfuture-queue-perl-0.51/debian/changelog 2023-05-25 19:59:54.000000000 +0000 +++ libfuture-queue-perl-0.52/debian/changelog 2024-01-20 22:37:20.000000000 +0000 @@ -1,3 +1,10 @@ +libfuture-queue-perl (0.52-1) unstable; urgency=medium + + * Import upstream version 0.52. + * Update years of upstream and packaging copyright. + + -- gregor herrmann Sat, 20 Jan 2024 23:37:20 +0100 + libfuture-queue-perl (0.51-2) unstable; urgency=medium * No-change source-only re-upload. diff -Nru libfuture-queue-perl-0.51/debian/copyright libfuture-queue-perl-0.52/debian/copyright --- libfuture-queue-perl-0.51/debian/copyright 2023-05-25 19:59:54.000000000 +0000 +++ libfuture-queue-perl-0.52/debian/copyright 2024-01-20 22:37:20.000000000 +0000 @@ -4,11 +4,11 @@ Upstream-Name: Future-Queue Files: * -Copyright: 2023, Paul Evans +Copyright: 2019-2024, Paul Evans License: Artistic or GPL-1+ Files: debian/* -Copyright: 2023, gregor herrmann +Copyright: 2023-2024, gregor herrmann License: Artistic or GPL-1+ License: Artistic diff -Nru libfuture-queue-perl-0.51/lib/Future/Queue.pm libfuture-queue-perl-0.52/lib/Future/Queue.pm --- libfuture-queue-perl-0.51/lib/Future/Queue.pm 2023-02-08 14:05:46.000000000 +0000 +++ libfuture-queue-perl-0.52/lib/Future/Queue.pm 2024-01-03 12:07:36.000000000 +0000 @@ -1,9 +1,9 @@ # You may distribute under the terms of either the GNU General Public License # or the Artistic License (the same terms as Perl itself) # -# (C) Paul Evans, 2019-2023 -- leonerd@leonerd.org.uk +# (C) Paul Evans, 2019-2024 -- leonerd@leonerd.org.uk -package Future::Queue 0.51; +package Future::Queue 0.52; use v5.14; use warnings; @@ -165,7 +165,7 @@ push @{ $self->{push_waiters} //= [] }, sub { my $count = $max - @$items; push @$items, splice @more, 0, $count; - $self->_manage_push_waiters; + $self->_manage_shift_waiters; return 0 if @more; diff -Nru libfuture-queue-perl-0.51/t/02max-items.t libfuture-queue-perl-0.52/t/02max-items.t --- libfuture-queue-perl-0.51/t/02max-items.t 2023-02-08 14:05:46.000000000 +0000 +++ libfuture-queue-perl-0.52/t/02max-items.t 2024-01-03 12:07:36.000000000 +0000 @@ -22,4 +22,19 @@ ok( $push_f->is_done, 'push future now done after shift' ); } +# RT151010 +{ + my $queue = Future::Queue->new( max_items => 5 ); + + my @pushf = map { $queue->push( $_ ) } 'a' .. 'q'; + + # Should not spinlock in deep recursion + my @shiftf = map { $queue->shift_atmost( 2 ) } 1 .. 9; + + is( [ map { $_->state } @pushf ], [ ("done") x 17 ], + 'all push futures completed' ); + is( [ map { $_->state } @shiftf ], [ ("done") x 9 ], + 'all shift futures completed' ); +} + done_testing;