Return-Path: X-Original-To: apmail-incubator-lucy-dev-archive@www.apache.org Delivered-To: apmail-incubator-lucy-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 406557E51 for ; Tue, 15 Nov 2011 07:02:55 +0000 (UTC) Received: (qmail 75401 invoked by uid 500); 15 Nov 2011 07:02:54 -0000 Delivered-To: apmail-incubator-lucy-dev-archive@incubator.apache.org Received: (qmail 75364 invoked by uid 500); 15 Nov 2011 07:02:54 -0000 Mailing-List: contact lucy-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucy-dev@incubator.apache.org Delivered-To: mailing list lucy-dev@incubator.apache.org Received: (qmail 75356 invoked by uid 99); 15 Nov 2011 07:02:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2011 07:02:52 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [68.116.39.62] (HELO rectangular.com) (68.116.39.62) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2011 07:02:46 +0000 Received: from marvin by rectangular.com with local (Exim 4.69) (envelope-from ) id 1RQD2I-00078g-7j for lucy-dev@incubator.apache.org; Mon, 14 Nov 2011 23:02:26 -0800 Date: Mon, 14 Nov 2011 23:02:26 -0800 From: Marvin Humphrey To: lucy-dev@incubator.apache.org Message-ID: <20111115070226.GA27412@rectangular.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: [lucy-dev] [patch] for ClusterSearcher.pm On Mon, Nov 14, 2011 at 10:49:33PM -0800, Dan Markham wrote: > Non-Blocking for mortals. LOL The arg's backwards (should be Blocking => 0) -- it's the unusual case where we need to actively turn something off to get what we want. After that, applied as r1202069, thanks for the improvement! http://svn.apache.org/viewvc?view=revision&revision=1202069 Marvin Humphrey > Index: ClusterSearcher.pm > =================================================================== > --- ClusterSearcher.pm (revision 1202059) > +++ ClusterSearcher.pm (working copy) > @@ -35,7 +35,6 @@ > > use IO::Socket::INET; > use IO::Select; > -use Fcntl qw( F_GETFL F_SETFL O_NONBLOCK ); > > sub new { > my ( $either, %args ) = @_; > @@ -54,12 +53,9 @@ > my $sock = IO::Socket::INET->new( > PeerAddr => $shard, > Proto => 'tcp', > + Blocking => 1, > ); > confess("No socket: $!") unless $sock; > - my $flags = fcntl( $sock, F_GETFL, 0 ) > - or confess "Can't get socket flags: $!"; > - fcntl( $sock, F_SETFL, $flags | O_NONBLOCK ) > - or confess "Can't set socket flags: $!"; > push @$socks, $sock; > } > > > > -Dan