Repository: puma/puma
File: lib/puma/dsl.rb (Ruby)

Code before:
    #
    # Note that setting this to false disables HTTP keepalive and
    # slow clients will occupy a handler thread while the request
    # is being sent. A reverse proxy, such as nginx, can handle
    # slow clients and queue requests before they reach Puma.
    #
    # The default is +true+.
    #
    # @see Puma::Server
    #
    def queue_requests(answer=true)
      @options[:queue_requests] = answer
    end

    # When a shutdown is requested, the backtraces of all the
    # threads will be written to $stdout. This can help figure
    # out why shutdown is hanging.
    #
    def shutdown_debug(val=true)
      @options[:shutdown_debug] = val
    end


    # Maximum delay of worker (process) accept loop (when workers >= 2)
    #
    # Attempts to route traffic to less-busy workers by causing them to delay
    # listening on the socket, allowing workers which are not processing as many
    # requests to pick up new requests first.
    #
    # The default is 0.005 seconds.
    #
    # Only takes effect when there are two or more workers. For interpreters that
    # do not support forking, this setting does nothing.
    #
    # To turn off this feature, set the value to 0.
    #
    # @see Puma::Server#handle_servers
    # @see Puma::ThreadPool#wait_for_less_busy_worker
    #
    def wait_for_less_busy_worker(val=0.005)
      @options[:wait_for_less_busy_worker] = val.to_f
    end

    # Control how the remote address of the connection is set. This
    # is configurable because to calculate the true socket peer address
    # a kernel syscall is required which for very fast rack handlers
    # slows down the handling significantly.
    #
    # There are 5 possible values:
    #
    # 1. **:socket** - read the peername from the socket using the

Review comment (suggestion):
While we're here, it seems 'them' should refer to the current (busy) worker, but the way this reads, one might assume it's referring to the less-busy worker.

```suggestion
    # Attempts to route traffic to less-busy workers by causing a busy worker to delay
```

Code after:
    #
    # Note that setting this to false disables HTTP keepalive and
    # slow clients will occupy a handler thread while the request
    # is being sent. A reverse proxy, such as nginx, can handle
    # slow clients and queue requests before they reach Puma.
    #
    # The default is +true+.
    #
    # @see Puma::Server
    #
    def queue_requests(answer=true)
      @options[:queue_requests] = answer
    end

    # When a shutdown is requested, the backtraces of all the
    # threads will be written to $stdout. This can help figure
    # out why shutdown is hanging.
    #
    def shutdown_debug(val=true)
      @options[:shutdown_debug] = val
    end


    # Maximum delay of worker accept loop.
    #
    # Attempts to route traffic to less-busy workers by causing a busy worker to delay
    # listening on the socket, allowing workers which are not processing as many
    # requests to pick up new requests first.
    #
    # The default is 0.005 seconds.
    #
    # To turn off this feature, set the value to 0.
    #
    # @note Cluster mode with >= 2 workers only.
    #
    # @note Interpreters with forking support only.
    #
    # @see Puma::Server#handle_servers
    # @see Puma::ThreadPool#wait_for_less_busy_worker
    #
    def wait_for_less_busy_worker(val=0.005)
      @options[:wait_for_less_busy_worker] = val.to_f
    end

    # Control how the remote address of the connection is set. This
    # is configurable because to calculate the true socket peer address
    # a kernel syscall is required which for very fast rack handlers
    # slows down the handling significantly.
    #
    # There are 5 possible values:
    #