Introduce a way to cancel running tasks and handle cleanup properly. ### TODO: - [ ] Implement a `cancel()` method for `Task`. - [ ] Ensure task execution halts when canceled. - [ ] Allow `TaskGroup` and `TaskManager` to cancel all tasks in progress. - [ ] Provide a way for tasks to handle cancellation gracefully.
Introduce a way to cancel running tasks and handle cleanup properly.
TODO:
cancel()method forTask.TaskGroupandTaskManagerto cancel all tasks in progress.