From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6939 64.71.128.0/18 X-Spam-Status: No, score=-1.9 required=3.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.io-splice.general Subject: [ANN] io_splice 2.0.0 - IO::Splice.copy_stream fixes Date: Sun, 6 Jun 2010 20:43:17 +0000 Message-ID: <20100606204317.GA3976@dcvr.yhbt.net> References: <20100605085330.GA14649@dcvr.yhbt.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1275857011 16167 80.91.229.12 (6 Jun 2010 20:43:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 Jun 2010 20:43:31 +0000 (UTC) To: ruby.io.splice@librelist.com Original-X-From: ruby.io.splice@librelist.com Sun Jun 06 22:43:26 2010 Return-path: Envelope-to: gclrig-ruby.io.splice@m.gmane.org List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: ruby.io.splice@librelist.com Xref: news.gmane.org gmane.comp.lang.ruby.io-splice.general:6 Archived-At: Received: from zedshaw.xen.prgmr.com ([64.71.167.205]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OLMgm-0004yF-HV for gclrig-ruby.io.splice@m.gmane.org; Sun, 06 Jun 2010 22:43:24 +0200 Received: from zedshaw.xen.prgmr.com (localhost [IPv6:::1]) by zedshaw.xen.prgmr.com (Postfix) with ESMTP id C819021AFF3 for ; Sun, 6 Jun 2010 20:51:15 +0000 (UTC) * http://bogomips.org/ruby_io_splice/ * ruby.io.splice@librelist.com * git://git.bogomips.org/ruby_io_splice.git Changes: This fixes the issue with our copy_stream where non-pipe descriptors with the O_NONBLOCK flag set were not handled correctly. Like IO.copy_stream in Ruby 1.9, our IO::Splice.copy_stream will _always_ block until IO is available (or raise if there are errors). IO::Splice.copy_stream now closes all file descriptors that were opened within the method, reducing pressure on the garbage collector. There are also new singleton convenience methods: * IO::Splice.full - blocks and splices the full amount * IO::Splice.partial - blocks until something is spliceable They are used internally to implement IO::Splice.copy_stream, but may also be useful to end users. Rcov shows 100% test coverage \o/ -- Eric Wong