Add asyncio.taskgroups and new Task methods (#7240)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Guido van Rossum
2022-02-16 14:32:20 -08:00
committed by GitHub
parent 5a8b9dafb3
commit 35bddd289f
9 changed files with 28 additions and 0 deletions

View File

@@ -276,6 +276,9 @@ class Task(Future[_T], Generic[_T]):
def cancel(self, msg: Any | None = ...) -> bool: ...
else:
def cancel(self) -> bool: ...
if sys.version_info >= (3, 11):
def cancelling(self) -> bool: ...
def uncancel(self) -> bool: ...
if sys.version_info < (3, 9):
@classmethod
def current_task(cls, loop: AbstractEventLoop | None = ...) -> Task[Any] | None: ...