if config.config['watch_for_cancel']:
(thread, stop_thread) = watch_for_cancel()
if config.config['watch_for_cancel']:
(thread, stop_thread) = watch_for_cancel()
cleanup_and_exit(thread, stop_thread, 2)
logger.debug('Invoking user code...')
with Timer() as t:
ret = fun(*args, **kwargs)
cleanup_and_exit(thread, stop_thread, 2)
logger.debug('Invoking user code...')
with Timer() as t:
ret = fun(*args, **kwargs)
cleanup_and_exit(thread, stop_thread, 4)
cleanup_and_exit(thread, stop_thread, 0)
cleanup_and_exit(thread, stop_thread, 4)
cleanup_and_exit(thread, stop_thread, 0)