class Pwrake::CommChannel
Attributes
host[R]
id[R]
Public Class Methods
new(host,id,queue,writer,ios=[])
click to toggle source
# File lib/pwrake/branch/communicator.rb, line 5 def initialize(host,id,queue,writer,ios=[]) @host = host @id = id @queue = queue @writer = writer @ios = ios end
Public Instance Methods
get_line()
click to toggle source
# File lib/pwrake/branch/communicator.rb, line 24 def get_line @queue.deq end
halt()
click to toggle source
# File lib/pwrake/branch/communicator.rb, line 28 def halt @queue.halt @writer.halt end
put_line(s)
click to toggle source
# File lib/pwrake/branch/communicator.rb, line 15 def put_line(s) if $cause_fault $cause_fault = nil Log.warn("closing writer io caller=\n#{caller.join("\n")}") @ios.each{|io| io.close} end @writer.put_line(s,@id) end