Thread#

ignis.utils.Utils.thread(target: Callable, *args, **kwargs) Thread#

Simply run the given function in a thread. The provided args and kwargs will be passed to the function.

Parameters:

target (Callable) -- The function to run.

Return type:

Thread

Returns:

The thread in which the function is running.

ignis.utils.Utils.run_in_thread(func: Callable) Callable#

Decorator to run the decorated function in a thread.

Return type:

Callable

class ignis.utils.ThreadTask(target: Callable, callback: Callable)#

Execute a function in another thread and call a callback when it's finished. The output from the function is passed to the callback.

Parameters:
  • target (Callable) -- The function to execute in another thread.

  • callback (Callable) -- The function to call when target has finished.

finished(*args)#
  • Signal

Parameters:

output (Any) -- The output from the function.

run() None#

Run this task.

Return type:

None