Skip Menu |

This queue is for tickets about the Thread-Queue CPAN distribution.

Report information
The Basics
Id: 107461
Status: resolved
Priority: 0/
Queue: Thread-Queue

People
Owner: Nobody in particular
Requestors: karlroyer [...] corp.cardboardfish.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 3.07



Subject: The limit option blocks.
Date: Fri, 2 Oct 2015 11:50:51 +0100
To: bug-Thread-Queue [...] rt.cpan.org
From: Karl Royer <karlroyer [...] corp.cardboardfish.com>
If the limit is x and the queue has x items, calling dequeue(x) does not signal to blocked threads enque'ing. The dequeue function needs:- cond_signal(%$self) if ((@$queue > $count) || $$self{'ENDED'}); changed to:- cond_signal(%$self) if ((@$queue >= $count) || $$self{'ENDED'}); else things get a little stuck!.
Thanks for this bug report. A fix has been applied, and a new version of Thread::Queue has been upload to CPAN. On 2015-10-02 06:51:25, karlroyer@corp.cardboardfish.com wrote: Show quoted text
> If the limit is x and the queue has x items, calling dequeue(x) does not > signal to blocked threads enque'ing. > > The dequeue function needs:- > > cond_signal(%$self) if ((@$queue > $count) || $$self{'ENDED'}); > > changed to:- > > cond_signal(%$self) if ((@$queue >= $count) || $$self{'ENDED'}); > > else things get a little stuck!.