From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 64CB2203C3; Thu, 21 Jul 2016 00:57:07 +0000 (UTC) Date: Thu, 21 Jul 2016 00:57:07 +0000 From: Eric Wong To: yahns-public@yhbt.net Subject: [PATCH 4/2] wbuf_lite: clear @busy flag when re-arming Message-ID: <20160721005707.GA20577@dcvr> References: <20160719222437.23103-1-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160719222437.23103-1-e@80x24.org> List-Id: This allows us to speed up subsequent calls to wbuf_write when the client socket buffers are cleared. This doesn't affect functionality outside of performance. --- lib/yahns/wbuf_lite.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/yahns/wbuf_lite.rb b/lib/yahns/wbuf_lite.rb index 7d77da9..46da501 100644 --- a/lib/yahns/wbuf_lite.rb +++ b/lib/yahns/wbuf_lite.rb @@ -90,6 +90,7 @@ def wbuf_close(client) # the req_res socket itself could be completely drained of readable # data and just waiting for another request (which we don't support, yet) if @req_res + @busy = false client.hijack_cleanup Thread.current[:yahns_queue].queue_mod(@req_res, Yahns::Queue::QEV_WR) return :ignore -- EW