Add an internal `cancel_task` API to the task scheduler.