Exception: LeanPool::TimeoutError

Inherits:
Error
  • Object
show all
Defined in:
lib/lean_pool/errors.rb

Overview

Raised when a pool checkout operation times out.

This error is raised when attempting to checkout a resource from a pool that is at capacity and no resources become available within the specified timeout period.

Examples:

Handling timeout errors

begin
  pool.checkout(timeout: 1.0) { |r| r.operation }
rescue LeanPool::TimeoutError => e
  puts "Pool is busy, try again later"
end

Since:

  • 0.1.0