class documentation
Represents a task to be executed by ThreadManager.
| Method | __init__ |
Initialize the task. |
| Method | id |
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 |
Undocumented |
| Instance Variable | stack |
Undocumented |
| Instance Variable | start |
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:str | The task name. |
function:callable | The function to run. |
args:tuple | Arguments to pass to the function. Defaults to (). |
timeout:int | Timeout in milliseconds. Defaults to 0. |
stackint | Thread stack size in bytes. Defaults to 0. |