cancel_task_and_wait

async lsst.ts.m2com.cancel_task_and_wait(task: Task | Future) None

Cancel the asynchronous task (if not done) and wait for it to complete.

Parameters

taskasyncio.Task or asyncio.Future

Asynchronous task.