mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Correct documentation of check interval - it's 100 by default, not 10 any
longer. Pointed out by Alex Martelli.
This commit is contained in:
parent
74902508dc
commit
eec26f982a
3 changed files with 4 additions and 4 deletions
|
@ -348,7 +348,7 @@ Therefore, the rule exists that only the thread that has acquired the
|
||||||
global interpreter lock may operate on Python objects or call Python/C
|
global interpreter lock may operate on Python objects or call Python/C
|
||||||
API functions. In order to support multi-threaded Python programs,
|
API functions. In order to support multi-threaded Python programs,
|
||||||
the interpreter regularly releases and reacquires the lock --- by
|
the interpreter regularly releases and reacquires the lock --- by
|
||||||
default, every ten bytecode instructions (this can be changed with
|
default, every 100 bytecode instructions (this can be changed with
|
||||||
\withsubitem{(in module sys)}{\ttindex{setcheckinterval()}}
|
\withsubitem{(in module sys)}{\ttindex{setcheckinterval()}}
|
||||||
\function{sys.setcheckinterval()}). The lock is also released and
|
\function{sys.setcheckinterval()}). The lock is also released and
|
||||||
reacquired around potentially blocking I/O operations like reading or
|
reacquired around potentially blocking I/O operations like reading or
|
||||||
|
|
|
@ -394,8 +394,8 @@ else:
|
||||||
\begin{funcdesc}{setcheckinterval}{interval}
|
\begin{funcdesc}{setcheckinterval}{interval}
|
||||||
Set the interpreter's ``check interval''. This integer value
|
Set the interpreter's ``check interval''. This integer value
|
||||||
determines how often the interpreter checks for periodic things such
|
determines how often the interpreter checks for periodic things such
|
||||||
as thread switches and signal handlers. The default is \code{10},
|
as thread switches and signal handlers. The default is \code{100},
|
||||||
meaning the check is performed every 10 Python virtual instructions.
|
meaning the check is performed every 100 Python virtual instructions.
|
||||||
Setting it to a larger value may increase performance for programs
|
Setting it to a larger value may increase performance for programs
|
||||||
using threads. Setting it to a value \code{<=} 0 checks every
|
using threads. Setting it to a value \code{<=} 0 checks every
|
||||||
virtual instruction, maximizing responsiveness as well as overhead.
|
virtual instruction, maximizing responsiveness as well as overhead.
|
||||||
|
|
|
@ -1361,7 +1361,7 @@ getrefcount(object Returns the reference count of the object. Generally one
|
||||||
) higher than you might expect, because of object arg temp
|
) higher than you might expect, because of object arg temp
|
||||||
reference.
|
reference.
|
||||||
setcheckinterval( Sets the interpreter's thread switching interval (in number
|
setcheckinterval( Sets the interpreter's thread switching interval (in number
|
||||||
interval) of virtual code instructions, default:10).
|
interval) of virtual code instructions, default:100).
|
||||||
settrace(func) Sets a trace function: called before each line ofcode is
|
settrace(func) Sets a trace function: called before each line ofcode is
|
||||||
exited.
|
exited.
|
||||||
setprofile(func) Sets a profile function for performance profiling.
|
setprofile(func) Sets a profile function for performance profiling.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue