Class: Routemaster::Cache::Pool
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Routemaster::Cache::Pool
- Includes:
- Singleton
- Defined in:
- lib/routemaster/cache.rb
Overview
A pool of threads, used for parallel/future request processing.
Instance Method Summary collapse
-
#initialize ⇒ Pool
constructor
A new instance of Pool.
Constructor Details
#initialize ⇒ Pool
Returns a new instance of Pool.
28 29 30 31 32 33 34 35 |
# File 'lib/routemaster/cache.rb', line 28 def initialize Thread.pool(5, 20).tap do |p| # TODO: configurable pool size and trim timeout? p.auto_trim! p.idle_trim! 10 # 10 seconds super p end end |