mperham / rack-fiber_pool

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

Size of fiber pool should be configurable #3

Closed igrigorik closed 13 years ago

igrigorik commented 14 years ago
 @fiber_pool = ::FiberPool.new

That creates a pool of max size 100. Just doing some testing on this side with a simple sleep query and this is the actual bottleneck in throughput. I'm thinking the size should be configurable when you include the middleware?

mperham commented 14 years ago

Pull requests accepted. See Rails' CookieStore for example.

maccman commented 14 years ago

I'd love to see this feature included

JoshMcKin commented 13 years ago

Would adding Rack::FiberPool::SIZE = 250 to the environment.rb file of a Rails3 app be the correct location for setting pool size?

mperham commented 13 years ago

Josh, I don't want to advise you on how to override constants - it's a terrible hack. I'll see if I can implement something proper when I am working on OSS next.

JoshMcKin commented 13 years ago

Word. Guess I'll can just unpack it and change it in the code. Looking forward to the update.

mperham commented 13 years ago

I've implemented the change but still need to write some testing infrastructure before I plan on releasing a new gem.

mperham commented 13 years ago

Just pushed 0.9.1

JoshMcKin commented 13 years ago

awesome, thanks.