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: AS47066 71.19.144.0/20 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: [PUSHED] remove copy_stream tests and references Date: Sun, 9 Feb 2014 07:29:52 +0000 Message-ID: <20140209072952.GA20152@dcvr.yhbt.net> References: <20140209005102.GA4222@dcvr.yhbt.net> <20140209005102.GA4222@dcvr.yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1391931011 21656 80.91.229.3 (9 Feb 2014 07:30:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Feb 2014 07:30:11 +0000 (UTC) To: ruby.io.splice@librelist.org Original-X-From: ruby.io.splice@librelist.org Sun Feb 09 08:30:18 2014 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.org Xref: news.gmane.org gmane.comp.lang.ruby.io-splice.general:48 Archived-At: Received: from zedshaw2.xen.prgmr.com ([71.19.156.177]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WCOqF-0001k9-EU for gclrig-ruby.io.splice@m.gmane.org; Sun, 09 Feb 2014 08:30:15 +0100 Received: from zedshaw2.xen.prgmr.com (unknown [IPv6:::1]) by zedshaw2.xen.prgmr.com (Postfix) with ESMTP id D4D2074FDD for ; Sun, 9 Feb 2014 07:38:46 +0000 (UTC) It is deprecated, so stop testing and advertising it. --- README | 4 +- examples/splice-cp.rb | 14 +- io_splice.gemspec | 1 - test/test_copy_stream.rb | 340 ------------------------------------------ test/test_io_splice.rb | 124 --------------- test/test_rack_file_compat.rb | 31 ---- test/test_tcp_splice.rb | 66 -------- 7 files changed, 4 insertions(+), 576 deletions(-) delete mode 100644 test/test_copy_stream.rb delete mode 100644 test/test_rack_file_compat.rb delete mode 100644 test/test_tcp_splice.rb (abbreviated diff, since the rest is all deletions) diff --git a/README b/README index 6300ac6..5245cb1 100644 --- a/README +++ b/README @@ -14,11 +14,9 @@ buffer. arbitrary file descriptors (assuming kernel support), not just file-to-socket (or file-to-anything in newer Linux). -* Thread-safe blocking operations under Ruby 1.9, releases GVL +* Thread-safe blocking operations under Ruby 1.9+, releases GVL if blocking operations are used. -* Almost drop-in replacement for IO.copy_stream: IO::Splice.copy_stream - * Safely usable with non-blocking I/O frameworks (unlike IO.copy_stream) when combined with the IO::Splice::F_NONBLOCK flag. diff --git a/examples/splice-cp.rb b/examples/splice-cp.rb index bf0d518..8141e51 100755 --- a/examples/splice-cp.rb +++ b/examples/splice-cp.rb @@ -1,13 +1,5 @@ #!/usr/bin/env ruby # -*- encoding: binary -*- - -# Example of using IO.splice to copy a file -# This can be significantly faster than IO.copy_stream as data -# is never copied into userspace. - -require 'io/splice' - -usage = "#$0 SOURCE DEST" -source = ARGV.shift or abort usage -dest = ARGV.shift or abort usage -IO::Splice.copy_stream(source, dest) +# This example is no longer valid, IO.copy_stream is faster in Ruby 2.2+ +# since it uses sendfile directly, which now allows direct file-to-file +# copying (on Linux only) with fewer syscalls than splice.