From 894cb73887c106acc793f0317ee849ae215ead56 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 25 Oct 2010 22:15:47 +0000 Subject: reduce dependency on IO#write_nonblock kgio_trywrite is superior if it is available. --- lib/rainbows/writer_thread_pool.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/rainbows/writer_thread_pool.rb') diff --git a/lib/rainbows/writer_thread_pool.rb b/lib/rainbows/writer_thread_pool.rb index 335a901..a8ffd7d 100644 --- a/lib/rainbows/writer_thread_pool.rb +++ b/lib/rainbows/writer_thread_pool.rb @@ -29,10 +29,6 @@ module Rainbows to_io.kgio_addr end - def readpartial(size, buf = "") - to_io.readpartial(size, buf) - end - def kgio_read(size, buf = "") to_io.kgio_read(size, buf) end @@ -41,8 +37,8 @@ module Rainbows to_io.kgio_read!(size, buf) end - def write_nonblock(buf) - to_io.write_nonblock(buf) + def kgio_trywrite(buf) + to_io.kgio_trywrite(buf) end def write(buf) -- cgit v1.2.3-24-ge0c7