Muscat.Helpers.Future module

CheckFutureNumpy()[source]
CheckFutureSequence()[source]
CheckIntegrity(GUI: bool = False) → str[source]
class Future(task, *args)[source]

Bases: object

Run a task asynchronously in a background thread.

Instead of calling a method directly:

res = method(arg1, arg2)

create a future and retrieve the result later:

future = Future(method, arg1, arg2)
# ...
res = future.get()

Notes

This is mostly useful for tasks that release the GIL; pure Python work may still execute sequentially.

args_: tuple[Any]
available()[source]

returns if the data is available to use (not blocking)

get()[source]

returns the data returned by task (blocking)

originalArgs_: list[Any]
res_: Any
run_(task)[source]
wasWritable_: list[bool]