From 312810a145c596e6bde9f04f00a2eb6679c3509b Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Tue, 23 Jul 2024 22:03:30 +0100 Subject: [PATCH] Docs --- README.rst | 2 +- docs/api.rst | 2 +- docs/index.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 0d0d593..b6e477c 100644 --- a/README.rst +++ b/README.rst @@ -55,7 +55,7 @@ Usage example Shielding tasks with a scheduler ================================ -It is typically recommended to use :func:`asyncio.shield` to protect tasks +It is typically recommended to use :function:`asyncio.shield` to protect tasks from cancellation. However, the inner shielded tasks can't be tracked and are therefore at risk of being cancelled during application shutdown. diff --git a/docs/api.rst b/docs/api.rst index 8a4fb02..f5c024c 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -108,7 +108,7 @@ Scheduler Protect an awaitable from being cancelled. - This is a drop-in replacement for :func:`asyncio.shield`, with the + This is a drop-in replacement for :function:`asyncio.shield`, with the addition of tracking the shielded task in the scheduler. This can be used to ensure that shielded tasks will actually be completed on application shutdown. diff --git a/docs/index.rst b/docs/index.rst index e1ab465..7d35d0a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -47,7 +47,7 @@ For further information read :ref:`aiojobs-quickstart`, Shielding tasks with a scheduler -------------------------------- -It is typically recommended to use :func:`asyncio.shield` to protect tasks +It is typically recommended to use :function:`asyncio.shield` to protect tasks from cancellation. However, the inner shielded tasks can't be tracked and are therefore at risk of being cancelled during application shutdown.