class DB::Pool(T)
- DB::Pool(T)
- Reference
- Object
Defined in:
db/pool.crConstructors
- .new(pool_options : Options = Options.new, &factory : -> T)
-
.new(initial_pool_size = 1, max_pool_size = 0, max_idle_pool_size = 1, checkout_timeout = 5.0, retry_attempts = 1, retry_delay = 0.2, &factory : -> T)
DEPRECATED Use
#new
with DB::Pool::Options instead
Instance Method Summary
- #checkout : T
- #checkout(&block : T -> )
-
#close : Nil
close all resources in the pool
- #release(resource : T) : Nil
-
#stats
Returns stats of the pool
Constructor Detail
def self.new(initial_pool_size = 1, max_pool_size = 0, max_idle_pool_size = 1, checkout_timeout = 5.0, retry_attempts = 1, retry_delay = 0.2, &factory : -> T)
#
DEPRECATED Use #new
with DB::Pool::Options instead