by randomdata · 14y ago · 0 comments
def index
self.response_body = Enumerator.new do |socket|
100.times do
socket << "hello world"
end
end
end
Your API is a little less verbose, I'll give you that, but I don't see why you need Queues and Threads unless the problem actually calls for those things. It still looks like you are writing to a socket either way. headers['X-Accel-Buffering'] = 'no'