0001-Clarifying-timeout-documentation-to-make-it-clear-th.patch

Alf Mikula, 05/28/2011 08:22 AM

Download (2.03 KB)

View differences:

lib/net/http.rb
618 618
    # The port number to connect to.
619 619
    attr_reader :port
620 620

  
621
    # Number of seconds to wait for the connection to open.
622
    # If the HTTP object cannot open a connection in this many seconds,
623
    # it raises a TimeoutError exception.
621
    # Number of seconds to wait for the connection to open. Any number
622
    # may be used, including Floats for fractional seconds. If the HTTP
623
    # object cannot open a connection in this many seconds, it raises a
624
    # TimeoutError exception.
624 625
    attr_accessor :open_timeout
625 626

  
626 627
    # Number of seconds to wait for one block to be read (via one read(2)
627
    # call). If the HTTP object cannot read data in this many seconds,
628
    # call). Any number may be used, including Floats for fractional
629
    # seconds. If the HTTP object cannot read data in this many seconds,
628 630
    # it raises a TimeoutError exception.
629 631
    attr_reader :read_timeout
630 632

  
lib/timeout.rb
36 36
  # Perform an operation in a block, timing it out if it takes longer
37 37
  # than +sec+ seconds to complete.
38 38
  #
39
  # +sec+:: number of seconds to wait for the block to terminate
39
  # +sec+:: Number of seconds to wait for the block to terminate. Any number
40
  #         may be used, including Floats to specify fractional seconds.
40 41
  # +klass+:: Exception Class to raise if the block fails to terminate
41 42
  #           in +sec+ seconds.  Omitting will use the default, Timeout::Error
42 43
  #
43
-