class documentation

Represents a task to be executed by ThreadManager.

Method __init__ Initialize the task.
Method id.setter Set the task ID.
Method stop Request the task to stop.
Class Variable __slots__ Undocumented
Instance Variable args Undocumented
Instance Variable error Undocumented
Instance Variable function Undocumented
Instance Variable name Undocumented
Instance Variable should_stop Undocumented
Instance Variable stack_size Undocumented
Instance Variable start_time Undocumented
Instance Variable timeout Undocumented
Property id Get the task ID.
Instance Variable _id Undocumented
def __init__(self, name: str, function: callable, args: tuple = (), timeout: int = 0, stack_size: int = 0):

Initialize the task.

Parameters
name:strThe task name.
function:callableThe function to run.
args:tupleArguments to pass to the function. Defaults to ().
timeout:intTimeout in milliseconds. Defaults to 0.
stack_size:intThread stack size in bytes. Defaults to 0.
def id(self, value: int):

Set the task ID.

Parameters
value:intThe new task ID.
def stop(self):

Request the task to stop.

__slots__: tuple[str, ...] =

Undocumented

args =

Undocumented

error =

Undocumented

function =

Undocumented

name =

Undocumented

should_stop: bool =

Undocumented

stack_size =

Undocumented

start_time: int =

Undocumented

timeout =

Undocumented

@property
id: int =

Get the task ID.

_id =

Undocumented