rainbows.git  about / heads / tags
Unicorn for sleepy apps and slow clients
blob 31ee561ef1267ba539f34d8a4b731a975b36147f 263 bytes (raw)
$ git show HEAD:t/simple-http_NeverBlock.ru	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 
use Rack::ContentLength
use Rack::ContentType
run lambda { |env|
  if env['rack.multithread'] == false &&
    EM.reactor_running? &&
    env['rainbows.model'] == :NeverBlock
    [ 200, {}, [ Thread.current.inspect << "\n" ] ]
  else
    raise env.inspect
  end
}

git clone https://yhbt.net/rainbows.git