Posted By: Eric Wong
Date: 2011-05-16 16:55
Summary: io_splice 4.1.0 - copy_stream enhancement for 1.9
Project: Quack Ruby Projects
The splice family of Linux system calls can transfer data between file descriptors without the need to copy data into userspace. Instead of a userspace buffer, they rely on an ordinary Unix pipe as a kernel-level buffer.
* http://bogomips.org/ruby_io_splice/ * ruby.io.splice@librelist.com />* git://bogomips.org/ruby_io_splice.git
Changes:
IO::Splice.copy_stream coerces based on the availability of the #to_path method in source and destination arguments.
This is to be compatible with IO.copy_stream and also Rack::File since this may be used in web servers.
This is NOT visible with Ruby 1.8 since File.open doesn't coerce with #to_path on the given object. |
|