Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eec26f9

Browse files
author
Skip Montanaro
committed
Correct documentation of check interval - it's 100 by default, not 10 any
longer. Pointed out by Alex Martelli.
1 parent 7490250 commit eec26f9

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/api/init.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ \section{Thread State and the Global Interpreter Lock
348348
global interpreter lock may operate on Python objects or call Python/C
349349
API functions. In order to support multi-threaded Python programs,
350350
the interpreter regularly releases and reacquires the lock --- by
351-
default, every ten bytecode instructions (this can be changed with
351+
default, every 100 bytecode instructions (this can be changed with
352352
\withsubitem{(in module sys)}{\ttindex{setcheckinterval()}}
353353
\function{sys.setcheckinterval()}). The lock is also released and
354354
reacquired around potentially blocking I/O operations like reading or

Doc/lib/libsys.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ \section{\module{sys} ---
394394
\begin{funcdesc}{setcheckinterval}{interval}
395395
Set the interpreter's ``check interval''. This integer value
396396
determines how often the interpreter checks for periodic things such
397-
as thread switches and signal handlers. The default is \code{10},
398-
meaning the check is performed every 10 Python virtual instructions.
397+
as thread switches and signal handlers. The default is \code{100},
398+
meaning the check is performed every 100 Python virtual instructions.
399399
Setting it to a larger value may increase performance for programs
400400
using threads. Setting it to a value \code{<=} 0 checks every
401401
virtual instruction, maximizing responsiveness as well as overhead.

Misc/cheatsheet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,7 @@ getrefcount(object Returns the reference count of the object. Generally one
13611361
) higher than you might expect, because of object arg temp
13621362
reference.
13631363
setcheckinterval( Sets the interpreter's thread switching interval (in number
1364-
interval) of virtual code instructions, default:10).
1364+
interval) of virtual code instructions, default:100).
13651365
settrace(func) Sets a trace function: called before each line ofcode is
13661366
exited.
13671367
setprofile(func) Sets a profile function for performance profiling.

0 commit comments

Comments
 (0)