textual.work
A decorator used to create workers.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
Callable[FactoryParamSpec, ReturnType] | Callable[FactoryParamSpec, Coroutine[None, None, ReturnType]] | None
|
A function or coroutine. |
None
|
|
str
|
A short string to identify the worker (in logs and debugging). |
''
|
|
str
|
A short string to identify a group of workers. |
'default'
|
|
bool
|
Exit the app if the worker raises an error. Set to |
True
|
|
bool
|
Cancel all workers in the same group. |
False
|
|
str | None
|
Readable description of the worker for debugging purposes. By default, it uses a string representation of the decorated method and its arguments. |
None
|
|
bool
|
Mark the method as a thread worker. |
False
|