lib/rainbows/writer_thread_pool.rb in rainbows-0.93.0 vs lib/rainbows/writer_thread_pool.rb in rainbows-0.94.0
- old
+ new
@@ -44,17 +44,12 @@
def closed?
false
end
end
- alias base_write_body write_body
- if IO.respond_to?(:copy_stream)
- undef_method :write_body
-
- def write_body(qclient, body)
- qclient.q << [ qclient.to_io, :body, body ]
- end
+ def write_body(qclient, body)
+ qclient.q << [ qclient.to_io, :body, body ]
end
@@nr = 0
@@q = nil
@@ -69,10 +64,10 @@
qp = (1..worker_connections).map do |n|
QueuePool.new(1) do |response|
begin
io, arg1, arg2 = response
case arg1
- when :body then base_write_body(io, arg2)
+ when :body then Base.write_body(io, arg2)
when :close then io.close unless io.closed?
else
io.write(arg1)
end
rescue => err