MCPcopy Create free account
hub / github.com/albertz/helpers / with_timeout

Function with_timeout

asyncproc.py:41–94  ·  view source on GitHub ↗

Call a function, allowing it only to take a certain amount of time. Parameters: - timeout The time, in seconds, the function is allowed to spend. This must be an integer, due to limitations in the SIGALRM handling. - func The function to call. - *args Non-keyword arguments to

(timeout, func, *args, **kwargs)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

terminateMethod · 0.85

Calls 2

TimeoutClass · 0.85
killMethod · 0.45

Tested by

no test coverage detected