def pop
      alarm = (Time.now + @wait_timeout)
      clnt = nil
      dirty = false
      while !@shutdown
        raise_alarm if (Time.now > alarm)
        @mutex.synchronize do
          begin
            if clnt = @_pool.pop
              dirty = true
            else
              clnt = _fetch_new(&@client_block)
            end
          ensure
            if clnt
              _checkout(clnt)
              @cond.signal
            else
              @reaper.wakeup if @reaper && _dead_clients?
              @cond.wait(@mutex,@wait_timeout)
            end
          end
        end
        break if clnt
      end
      clean_client(clnt) if dirty && clnt
      clnt
    end
def pop
      alarm = (Time.now + @wait_timeout)
      clnt = nil
      dirty = false
      while !@shutdown
        raise_alarm if (Time.now > alarm)
        @mutex.synchronize do
          begin
            if clnt = @_pool.pop
              dirty = true
            else
              clnt = _fetch_new(&@client_block)
            end
          ensure
            if clnt
              _checkout(clnt)
              @cond.signal
            else
              @reaper.wakeup if @reaper && _dead_clients?
              @cond.wait(@mutex,@wait_timeout)
            end
          end
        end
        break if clnt
      end
      clean_client(clnt) if dirty && clnt
      clnt
    end
Safely pull client from pool, adding if allowed
 If a client is not available, check for dead
 resources and schedule reap if nesseccary