io_splice RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: ruby.io.splice@librelist.org
Subject: [PUSHED] remove copy_stream tests and references
Date: Sun, 9 Feb 2014 07:29:52 +0000	[thread overview]
Message-ID: <20140209072952.GA20152@dcvr.yhbt.net> (raw)
In-Reply-To: 20140209005102.GA4222@dcvr.yhbt.net

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.


      reply	other threads:[~2014-02-09  7:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-09  0:51 [PATCH] prepare for rb_thread_blocking_region removal Eric Wong
2014-02-09  7:29 ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/ruby_io_splice/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140209072952.GA20152@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=ruby.io.splice@librelist.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/ruby_io_splice.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).