(self, task: Callable, *args, **kwargs)
Call from derived class to start the task.
        :param task: runner - a method to run in a thread - should accept
        `state` parameter
Call from derived class to start the task.
        :param task: runner - a method to run in a thread - should accept
        `state` parameter
Call from derived class to start the task . : param task : runner - a method to run in a thread - should accept state parameter
def start(self, task: Callable, *args, **kwargs):
        """ Call from derived class to start the task.
        :param task: runner - a method to run in a thread - should accept
        `state` parameter
        """
        self.__cancel_task(wait=False)
        assert callable(task), "`task` must be callable!"
        state = TaskState(self)
        task = partial(task, *(args + (state,)), **kwargs)
        self.__start_task(task, state)
def start ( self , task : Callable , * args , * * kwargs ) : self . __cancel_task ( wait = False ) assert callable ( task ) , "`task` must be callable!" state = TaskState ( self ) task = partial ( task , * ( args + ( state , ) ) , * * kwargs ) self . __start_task ( task , state )