It appears identical. I am not sure why I thought it is better.
Sorry about it...
Steve Lihn
-Original Message-
From: Michael G Schwern via RT [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 05, 2005 1:29 AM
To: Lihn, Steve
Subject: [perl #19088] Thread::Queue
[EMAIL PROTECTED
On Wed, Jul 06, 2005 at 09:12:29AM -0400, Lihn, Steve wrote:
It appears identical. I am not sure why I thought it is better.
Sorry about it...
Hmm, its threads so appearing identical is not always identical.
If I had to guess the intention was to protect all of @$q from being
sucked away? So
On Wed, Jul 06, 2005 at 08:32:52AM -0700, Michael G Schwern wrote:
The original is like:
sub dequeue {
my $q = shift;
lock(@$q);
cond_wait @$q until @$q;
cond_signal @$q if @$q 1;
return shift @$q;
}
Should it be safer if it goes like this?