doc: misc cleanups and additions for RDoc
[rainbows.git] / lib / rainbows / writer_thread_pool / client.rb
blob3cc33354e9ff4767ae3d5d4a60908560f52f7d09
1 # -*- encoding: binary -*-
2 # :enddoc:
3 # used to wrap a BasicSocket to use with +q+ for all writes
4 # this is compatible with IO.select
5 class Rainbows::WriterThreadPool::Client < Struct.new(:to_io, :q)
6   include Rainbows::SocketProxy
8   def write(buf)
9     q << [ to_io, buf ]
10   end
12   def close
13     q << [ to_io, :close ]
14   end
16   def closed?
17     false
18   end
19 end