mperham / rack-fiber_pool

Rack middleware to execute each request in a Fiber
MIT License
244 stars 24 forks source link

Fiber pool not being use for nested Rack apps? #10

Open eliaslevy opened 13 years ago

eliaslevy commented 13 years ago

Maybe I am being thick, but I think the following should work:

app = Rack::Builder.new do use( Rack::FiberPool, :size => 50 ) map( '/app1' ) { call app1 } map( '/app2' ) { call app2 } end

Alas, it doesn't. The pool size limit is not applied to either app1 or app2. It seems I must call use( Rack::FiberPool, :size => 50 ) within each map block, which will create two different fiber pools, rather than a single one for all requests.

Is this expected? I am not understanding how Rack Builder work?