beatmup.Context¶
- class beatmup.Context¶
Beatmup engine context
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: beatmup.Context) -> None
__init__(self: beatmup.Context, arg0: int) -> None
Methods
__init__
(*args, **kwargs)Overloaded function.
abort_job
(self, job[, pool])Aborts a given submitted job.
busy
(self[, pool])Returns True if a specific thread pool in the context is executing a Task
check
(self[, pool])Checks if a specific thread pool is doing great: rethrows exceptions occurred during tasks execution, if any.
empty_gpu_recycle_bin
(self)Empties GPU recycle bin.
is_gpu_queried
(self)Returns True if GPU was queried and ready to use
is_gpu_ready
(self)Returns True if GPU was queried and ready to use
limit_worker_count
(self, max_value[, pool])Limits maximum number of threads (workers) when performing tasks in a given pool
max_allowed_worker_count
(self[, pool])Returns maximum number of working threads per task in a given thread pool
perform_task
(self, task[, pool])Performs a given task.
query_gpu_info
(self)Queries information about GPU and returns a tuple of vendor and renderer strings, or None if no GPU available.
repeat_task
(self, task, abort_current[, pool])Ensures a given task executed at least once
submit_persistent_task
(self, task[, pool])Adds a new persistent task to the jobs queue
submit_task
(self, task[, pool])Adds a new task to the jobs queue
wait
(self[, pool])Blocks until all the submitted jobs are executed
wait_for_job
(self, job[, pool])Blocks until a given job finishes
warm_up_gpu
(self)Initializes GPU within a given Context if not yet (takes no effect if it already is).