mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-23 09:30:02 +02:00
tasks: don't start another task when it is already running
This commit is contained in:
parent
861e89f37a
commit
80da96657c
@ -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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user