Skip to content

Commit 6d61ef4

Browse files
committed
Update dis.rst
1 parent 7c7ad81 commit 6d61ef4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Doc/library/dis.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ the following command can be used to display the disassembly of
7878
3 LOAD_GLOBAL 1 (len + NULL)
7979
LOAD_FAST_BORROW 0 (alist)
8080
CALL 1
81+
CHECK_PERIODIC
8182
RETURN_VALUE
8283

8384
(The "2" is a line number).
@@ -217,6 +218,7 @@ Example:
217218
LOAD_GLOBAL
218219
LOAD_FAST_BORROW
219220
CALL
221+
CHECK_PERIODIC
220222
RETURN_VALUE
221223

222224

@@ -1751,6 +1753,15 @@ iterations of the loop.
17511753
.. versionadded:: 3.11
17521754

17531755

1756+
.. opcode:: CHECK_PERIODIC
1757+
1758+
Checks the eval breaker and performs periodic tasks if the eval breaker is set.
1759+
Tasks inlcude switching threads and performing GC amongst others.
1760+
All :opcode:`CALL` instructions must be followed by opcode:`CHECK_PERIODIC`.
1761+
1762+
.. versionadded:: 3.14
1763+
1764+
17541765
.. opcode:: HAVE_ARGUMENT
17551766

17561767
This is not really an opcode. It identifies the dividing line between

0 commit comments

Comments
 (0)