Improve docstring for Task.close and Task.mark_completed

This commit is contained in:
Richard Leibrandt
2023-02-21 15:21:56 +01:00
2 changed files with 10 additions and 8 deletions

View File

@@ -1725,10 +1725,10 @@ class Task(_Task):
def close(self):
"""
Closes the current Task and changes its status to "Completed".
Enables you to manually shutdown the task.
Enables you to manually shut down the task.
This method does not terminate the current Python process, in contrast to :meth:`Task.mark_completed`.
After having :meth:`Task.close`d a task, the respective object cannot be used anymore and
After having :meth:`Task.close` -d a task, the respective object cannot be used anymore and
methods like :meth:`Task.connect` or :meth:`Task.connect_configuration` will throw a `ValueError`.
In order to obtain an object representing the task again, use methods like :meth:`Task.get_task`.