def start_thread
      begin
        @logger.info("New pool thread is starting (#{self})")
        until(@kill) do
          begin
            @action = nil
            if(@pool.size > @pool.min && !@thread_timeout.zero?)
              Timeout::timeout(@thread_timeout) do
                @action = @pool.action
              end
            else
              @action = @pool.action
            end
            run(@action[0], @action[1]) unless @action.nil?
          rescue Timeout::Error
            @kill = true
          rescue Wakeup
            @logger.info("Thread #{::Thread.current} was woken up.")
          rescue Retimeout
            @logger.warn('Thread was woken up to reset thread timeout')
          rescue Exception => boom
            @logger.error("Pool thread caught an exception: #{boom}\n#{boom.backtrace.join("\n")}")
            @respond_to.raise boom
          end
        end
      rescue Retimeout
        @logger.warn('Thread was woken up to reset thread timeout')
        retry
      rescue Wakeup
        @logger.info("Thread #{::Thread.current} was woken up.")
      rescue Exception => boom
        @logger.error("Pool thread caught an exception: #{boom}\n#{boom.backtrace.join("\n")}")
        @respond_to.raise boom
      ensure
        @logger.info("Pool thread is shutting down (#{self})")
        @pool.remove(self)
      end
    end
def start_thread
      begin
        @logger.info("New pool thread is starting (#{self})")
        until(@kill) do
          begin
            @action = nil
            if(@pool.size > @pool.min && !@thread_timeout.zero?)
              Timeout::timeout(@thread_timeout) do
                @action = @pool.action
              end
            else
              @action = @pool.action
            end
            run(@action[0], @action[1]) unless @action.nil?
          rescue Timeout::Error
            @kill = true
          rescue Wakeup
            @logger.info("Thread #{::Thread.current} was woken up.")
          rescue Retimeout
            @logger.warn('Thread was woken up to reset thread timeout')
          rescue Exception => boom
            @logger.error("Pool thread caught an exception: #{boom}\n#{boom.backtrace.join("\n")}")
            @respond_to.raise boom
          end
        end
      rescue Retimeout
        @logger.warn('Thread was woken up to reset thread timeout')
        retry
      rescue Wakeup
        @logger.info("Thread #{::Thread.current} was woken up.")
      rescue Exception => boom
        @logger.error("Pool thread caught an exception: #{boom}\n#{boom.backtrace.join("\n")}")
        @respond_to.raise boom
      ensure
        @logger.info("Pool thread is shutting down (#{self})")
        @pool.remove(self)
      end
    end
Start our thread