diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-31 02:01:17 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-31 02:01:17 +0000 |
commit | e8e7e1aae2feb1de74add23dc9d97d60fb04d810 (patch) | |
tree | 0a049741029f688ca381a130e52ed82e22a0d42c /lib | |
parent | c25aa9f5d6b81d406a0a009f90a6cd87d62ccc1c (diff) | |
download | ruby-e8e7e1aae2feb1de74add23dc9d97d60fb04d810.tar.gz |
doumentation by @toolmantim [GH fixes #270]
* timeout.rb: Document Timeout::timeout 0 and nil argument behavior
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/timeout.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/timeout.rb b/lib/timeout.rb index 7fd87ff40b..284305bcca 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 # |