mirror of
https://github.com/tiqi-group/pydase.git
synced 2026-01-17 09:29:26 +01:00
tasks: don't start another task when it is already running
This commit is contained in:
@@ -36,6 +36,9 @@ class Task(pydase.DataService, Generic[P, R]):
|
||||
return self._status
|
||||
|
||||
def start(self, *args: P.args, **kwargs: P.kwargs) -> None:
|
||||
if self._task:
|
||||
return
|
||||
|
||||
def task_done_callback(task: asyncio.Task[R]) -> None:
|
||||
"""Handles tasks that have finished.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user