You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/glossary.rst
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,9 +103,7 @@ The one exception is :func:`trio.open_nursery` and :func:`anyio.create_task_grou
103
103
104
104
asyncio does not place any guarantees on if or when asyncio functions will
105
105
checkpoint. This means that enabling and adhering to :ref:`ASYNC91x <ASYNC910>`
106
-
will still not guarantee checkpoints on asyncio.
107
-
108
-
For anyio it will depend on the current backend.
106
+
will still not guarantee checkpoints on asyncio (even if used via anyio).
109
107
110
108
When using Trio (or an AnyIO library that people might use on Trio), it can be
111
109
very helpful to ensure that your own code adheres to the same guarantees as
@@ -123,7 +121,7 @@ To insert a checkpoint with no other side effects, you can use
123
121
124
122
Schedule Point
125
123
--------------
126
-
A schedule point is half of a full `checkpoint`, which allows the async backend to switch the running task, but doesn't check for cancellation (the other half is a `cancel_point`).
124
+
A schedule point is half of a full :ref:`checkpoint`, which allows the async backend to switch the running task, but doesn't check for cancellation (the other half is a :ref:`cancel_point`).
127
125
While you are unlikely to need one, they are available as :func:`trio.lowlevel.cancel_shielded_checkpoint`/:func:`anyio.lowlevel.cancel_shielded_checkpoint`, and equivalent to
128
126
129
127
.. code-block:: python
@@ -143,7 +141,7 @@ asyncio does not have any direct equivalents due to their cancellation model bei
143
141
144
142
Cancel Point
145
143
------------
146
-
A schedule point is half of a full `checkpoint`, which will raise :ref:`cancelled` if the enclosing cancel scope has been cancelled, but does not allow the scheduler to switch to a different task (the other half is a `schedule_point`).
144
+
A schedule point is half of a full :ref:`checkpoint`, which will raise :ref:`cancelled` if the enclosing cancel scope has been cancelled, but does not allow the scheduler to switch to a different task (the other half is a :ref:`schedule_point`).
147
145
While you are unlikely to need one, they are available as :func:`trio.lowlevel.checkpoint_if_cancelled`/:func:`anyio.lowlevel.checkpoint_if_cancelled`.
148
146
Users of asyncio might want to use :meth:`asyncio.Task.cancelled`.
0 commit comments