lib/em-synchrony/connection_pool.rb in em-synchrony-1.0.3 vs lib/em-synchrony/connection_pool.rb in em-synchrony-1.0.4

- old
+ new

@@ -25,9 +25,20 @@ yield conn ensure release(f) if not async end end + + # Returns current pool utilization. + # + # @return [Hash] Current utilization. + def pool_status + { + available: @available.size, + reserved: @reserved.size, + pending: @pending.size + } + end private # Acquire a lock on a connection and assign it to executing fiber # - if connection is available, pass it back to the calling block