Regen docs for 4.3.1
This commit is contained in:
parent
5ab59fd709
commit
cdd2d6d34f
@ -38,34 +38,34 @@ LICENSE, otherwise it is available at https://gith
|
||||
If #timeout is provided as a lambda/function, it will be called<br />
|
||||
prior to each invocation of the decorated function to calculate the timeout to be used<br />
|
||||
for that call, based on the arguments passed to the decorated function.<br />
|
||||
<br />
|
||||
<br />
|
||||
For example, you may have a "processData" function whose execution time<br />
|
||||
depends on the number of "data" elements, so you may want a million elements to have a <br />
|
||||
depends on the number of "data" elements, so you may want a million elements to have a<br />
|
||||
much higher timeout than seven elements.)<br />
|
||||
<br />
|
||||
If #allowOverride is True AND a kwarg of "forceTimeout" is passed to the wrapped function, that timeout<br />
|
||||
will be used for that single call.<br />
|
||||
<br />
|
||||
@param timeout <float OR lambda/function> - <br />
|
||||
@param timeout <float OR lambda/function> -<br />
|
||||
<br />
|
||||
**If float:**<br />
|
||||
Default number of seconds max to allow function to execute<br />
|
||||
before throwing FunctionTimedOut<br />
|
||||
<br />
|
||||
<br />
|
||||
**If lambda/function:<br />
|
||||
<br />
|
||||
If a function/lambda is provided, it will be called for every<br />
|
||||
invocation of the decorated function (unless #allowOverride=True and "forceTimeout" was passed) <br />
|
||||
invocation of the decorated function (unless #allowOverride=True and "forceTimeout" was passed)<br />
|
||||
to determine the timeout to use based on the arguments to the decorated function.<br />
|
||||
<br />
|
||||
The arguments as passed into the decorated function will be passed to this function.<br />
|
||||
They either must match exactly to what the decorated function has, OR<br />
|
||||
if you prefer to get the *args (list of ordered args) and **kwargs ( key : value keyword args form),<br />
|
||||
define your calculate function like:<br />
|
||||
<br />
|
||||
<br />
|
||||
def calculateTimeout(*args, **kwargs):<br />
|
||||
...<br />
|
||||
<br />
|
||||
<br />
|
||||
or lambda like:<br />
|
||||
<br />
|
||||
calculateTimeout = lambda *args, **kwargs : ...<br />
|
||||
|
||||
@ -62,7 +62,7 @@ Methods defined here:<br />
|
||||
<dl ><dt ><a name="FunctionTimedOut-retry" ><strong >retry</strong></a>(self, timeout='RETRY_SAME_TIMEOUT')</dt><dd ><tt >retry - Retry the timed-out function with same arguments.<br />
|
||||
<br />
|
||||
@param timeout <float/RETRY_SAME_TIMEOUT/None> Default RETRY_SAME_TIMEOUT<br />
|
||||
<br />
|
||||
<br />
|
||||
If RETRY_SAME_TIMEOUT : Will retry the function same args, same timeout<br />
|
||||
If a float/int : Will retry the function same args with provided timeout<br />
|
||||
If None : Will retry function same args no timeout<br />
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
<table width="100%" cellspacing="0" cellpadding="2" border="0" summary="heading" >
|
||||
<tr bgcolor="#7799ee" >
|
||||
<td valign="bottom" > <br />
|
||||
<font color="#ffffff" face="helvetica, arial" > <br /><big ><big ><strong >func_timeout</strong></big></big> (version 4.3.0)</font></td><td align="right" valign="bottom" ><font color="#ffffff" face="helvetica, arial" ><a href="func_timeout.html" >index</a></font></td></tr></table>
|
||||
<p ><tt >Copyright (c) 2016, 2017 Tim Savannah All Rights Reserved.<br />
|
||||
<font color="#ffffff" face="helvetica, arial" > <br /><big ><big ><strong >func_timeout</strong></big></big> (version 4.3.1)</font></td><td align="right" valign="bottom" ><font color="#ffffff" face="helvetica, arial" ><a href="func_timeout.html" >index</a></font></td></tr></table>
|
||||
<p ><tt >Copyright (c) 2016, 2017, 2019 Tim Savannah All Rights Reserved.<br />
|
||||
<br />
|
||||
Licensed under the Lesser GNU Public License Version 3, LGPLv3. You should have recieved a copy of this with the source distribution as<br />
|
||||
LICENSE, otherwise it is available at https://github.com/kata198/func_timeout/LICENSE</tt></p>
|
||||
@ -80,7 +80,7 @@ Methods defined here:<br />
|
||||
<dl ><dt ><a name="FunctionTimedOut-retry" ><strong >retry</strong></a>(self, timeout='RETRY_SAME_TIMEOUT')</dt><dd ><tt >retry - Retry the timed-out function with same arguments.<br />
|
||||
<br />
|
||||
@param timeout <float/RETRY_SAME_TIMEOUT/None> Default RETRY_SAME_TIMEOUT<br />
|
||||
<br />
|
||||
<br />
|
||||
If RETRY_SAME_TIMEOUT : Will retry the function same args, same timeout<br />
|
||||
If a float/int : Will retry the function same args with provided timeout<br />
|
||||
If None : Will retry function same args no timeout<br />
|
||||
@ -313,34 +313,34 @@ initial name is set by the constructor.</tt></dd>
|
||||
If #timeout is provided as a lambda/function, it will be called<br />
|
||||
prior to each invocation of the decorated function to calculate the timeout to be used<br />
|
||||
for that call, based on the arguments passed to the decorated function.<br />
|
||||
<br />
|
||||
<br />
|
||||
For example, you may have a "processData" function whose execution time<br />
|
||||
depends on the number of "data" elements, so you may want a million elements to have a <br />
|
||||
depends on the number of "data" elements, so you may want a million elements to have a<br />
|
||||
much higher timeout than seven elements.)<br />
|
||||
<br />
|
||||
If #allowOverride is True AND a kwarg of "forceTimeout" is passed to the wrapped function, that timeout<br />
|
||||
will be used for that single call.<br />
|
||||
<br />
|
||||
@param timeout <float OR lambda/function> - <br />
|
||||
@param timeout <float OR lambda/function> -<br />
|
||||
<br />
|
||||
**If float:**<br />
|
||||
Default number of seconds max to allow function to execute<br />
|
||||
before throwing <a href="#FunctionTimedOut" >FunctionTimedOut</a><br />
|
||||
<br />
|
||||
<br />
|
||||
**If lambda/function:<br />
|
||||
<br />
|
||||
If a function/lambda is provided, it will be called for every<br />
|
||||
invocation of the decorated function (unless #allowOverride=True and "forceTimeout" was passed) <br />
|
||||
invocation of the decorated function (unless #allowOverride=True and "forceTimeout" was passed)<br />
|
||||
to determine the timeout to use based on the arguments to the decorated function.<br />
|
||||
<br />
|
||||
The arguments as passed into the decorated function will be passed to this function.<br />
|
||||
They either must match exactly to what the decorated function has, OR<br />
|
||||
if you prefer to get the *args (list of ordered args) and **kwargs ( key : value keyword args form),<br />
|
||||
define your calculate function like:<br />
|
||||
<br />
|
||||
<br />
|
||||
def calculateTimeout(*args, **kwargs):<br />
|
||||
...<br />
|
||||
<br />
|
||||
<br />
|
||||
or lambda like:<br />
|
||||
<br />
|
||||
calculateTimeout = lambda *args, **kwargs : ...<br />
|
||||
@ -383,5 +383,5 @@ to return cleanly, but in most cases it
|
||||
|
||||
<tr ><td bgcolor="#55aa55" ><tt > </tt></td><td > </td>
|
||||
<td width="100%" ><strong >__all__</strong> = ('func_timeout', 'func_set_timeout', 'FunctionTimedOut', 'StoppableThread')<br />
|
||||
<strong >__version_tuple__</strong> = (4, 3, 0)</td></tr></table>
|
||||
<strong >__version_tuple__</strong> = (4, 3, 1)</td></tr></table>
|
||||
</p></p></p></p></body></html>
|
||||
Loading…
Reference in New Issue
Block a user