discover.utils.thread_utils module

Utility modules for NOVA-Server Threads

Author:

Dominik Schiller <dominik.schiller@uni-a.de>

Date:

13.09.2023

class discover.utils.thread_utils.BackendThread(target, name, args, kwargs)[source]

Bases: Thread

get_id()[source]
raise_exception()[source]
discover.utils.thread_utils.ml_thread_wrapper(func)[source]

Executing the function in a mutex protected thread for asynchronous execution of long-running ml tasks. The thread waits with execution unit the status_lock is released. To do any initialization before the thread starts acquire the status lock before creating the thread. :param func: :return: The thread

discover.utils.thread_utils.status_thread_wrapper(func)[source]