serena.util.thread#
Source code: serena/util/thread.py
- exception TimeoutException(message, timeout)[source]#
Bases:
Exception- Parameters:
message (str)
timeout (float)
- Return type:
None
- execute_with_timeout(func, timeout, function_name)[source]#
Executes the given function with a timeout
- Parameters:
func (Callable[[], T]) – the function to execute
timeout (float) – the timeout in seconds
function_name (str) – the name of the function (for error messages)
- Returns:
the execution result
- Return type: