Skip Menu |

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

Report information
The Basics
Id: 127141
Status: new
Priority: 0/
Queue: Thread-Pool-Simple

People
Owner: Nobody in particular
Requestors: trichmond [...] proofpoint.com
Cc:
AdminCc:

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



Subject: Small bug in remove_nb
Date: Tue, 18 Sep 2018 17:57:21 +0000
To: "bug-Thread-Pool-Simple [...] rt.cpan.org" <bug-Thread-Pool-Simple [...] rt.cpan.org>
From: Todd Richmond <trichmond [...] proofpoint.com>
There is a small logic error in sub_remove() when called from from remove_nb --- Simple.pm 2018-02-07 16:13:31.000000000 -0800 +++ Simple.pm 2018-02-07 16:29:07.000000000 -0800 @@ -283,7 +283,9 @@ sub _remove { cond_wait %{$self->{done}} until exists $self->{done}{$id}; cond_signal %{$self->{done}} if 1 < keys %{$self->{done}}; } - $exist = ($ret) = delete $self->{done}{$id}; + # Make remove_nb do what is expected + $exist = defined $self->{done}{$id} ? 1 : 0; + ($ret) = delete $self->{done}{$id}; } $self->_drop($id) if $exist; return $exist unless defined $ret;