Eric Wong <e...@80x24.org> wrote: > +++ b/examples/yahns_http2_rack1.conf.rb
> +app(:rack, "config.ru", preload: false) do > + protocols "http", "http2" Maybe the new config option should actually be something like: queue(protocol: 'http2') do backlog 128 worker_threads 8 end This means we'd have a third type of thread pool... > +++ b/lib/yahns/http2_rack1.rb > + stream.on(:half_close) do > + log.info "dispatch: #{req.inspect}" > + req = rack_env_for(req, input) > + h2_res_emit(stream, *self.class.app.call(req)) > + end And maybe enqueue work here: stream.on(:half_close) do @http2_queue.push([stream, req, input]) end And making h2_res_emit thread-safe when called from another thread. This would also make lazy, synchronous reading of rack.input for TeeInput/StreamInput easier. And yeah, the whole SPDY/HTTP-2 thing of reinventing a multi-stream socket layer inside of TCP connections smells bad to me.