Note set_timeout decorator in README

This commit is contained in:
Tim Savannah 2017-05-19 20:49:42 -04:00
parent f8ec7f492c
commit f7baa18e64
2 changed files with 25 additions and 0 deletions

View File

@ -25,6 +25,16 @@ This is the function wherein you pass the timeout, the function you want to call
@return - The return value that #func# gives
'''
**set\_timeout**
This is a decorator you can use on functions to apply func\_timeout. Takes a single argument -- timeout.
Example:
@set_timeout(2.5)
def myFunction(self, arg1, arg2):
...
**FunctionTimedOut**
Exception raised if the function times out

View File

@ -36,6 +36,21 @@ This is the function wherein you pass the timeout, the function you want to call
'''
**set_timeout**
This is a decorator you can use on functions to apply func_timeout. Takes a single argument -- timeout.
Example:
@set_timeout(2.5)
def myFunction(self, arg1, arg2):
...
**FunctionTimedOut**
Exception raised if the function times out