summaryrefslogtreecommitdiff
path: root/lib/timeout.rb
diff options
context:
space:
mode:
authorMichael Leibowitz <michael.leibowitz@intel.com>2013-08-15 15:02:54 -0700
committerMichael Leibowitz <michael.leibowitz@intel.com>2013-08-15 15:02:54 -0700
commit6b0e2a11aeccf2ebc707c22548a0c15c8c2bae06 (patch)
treed9d59f4b502927634d32832e963db76629ff5a2e /lib/timeout.rb
parent3b35de2a90e26b99e2a6d4f61dc56d6ce7ded748 (diff)
downloadruby-upstream.tar.gz
ruby-upstream.tar.bz2
ruby-upstream.zip
Imported Upstream version 1.9.3.p448upstream/1.9.3.p448upstream
Diffstat (limited to 'lib/timeout.rb')
-rw-r--r--lib/timeout.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/timeout.rb b/lib/timeout.rb
index 91d120a..16a168d 100644
--- a/lib/timeout.rb
+++ b/lib/timeout.rb
@@ -33,11 +33,12 @@ module Timeout
CALLER_OFFSET = ((c = caller[0]) && THIS_FILE =~ c) ? 1 : 0
# :startdoc:
- # Perform an operation in a block, timing it out if it takes longer
- # than +sec+ seconds to complete.
+ # Perform an operation in a block, raising an error if it takes longer than
+ # +sec+ seconds to complete.
#
# +sec+:: Number of seconds to wait for the block to terminate. Any number
- # may be used, including Floats to specify fractional seconds.
+ # may be used, including Floats to specify fractional seconds. A
+ # value of 0 or +nil+ will execute the block without any timeout.
# +klass+:: Exception Class to raise if the block fails to terminate
# in +sec+ seconds. Omitting will use the default, Timeout::Error
#