mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Add a couple of words about the new GIL implementation
This commit is contained in:
parent
aee355b7b5
commit
d42bc519d2
2 changed files with 46 additions and 0 deletions
|
@ -282,6 +282,9 @@ always available.
|
|||
|
||||
Return the interpreter's "check interval"; see :func:`setcheckinterval`.
|
||||
|
||||
.. deprecated:: 3.2
|
||||
Use :func:`getswitchinterval` instead.
|
||||
|
||||
|
||||
.. function:: getdefaultencoding()
|
||||
|
||||
|
@ -345,6 +348,12 @@ always available.
|
|||
collector.
|
||||
|
||||
|
||||
.. function:: getswitchinterval()
|
||||
|
||||
Return the interpreter's "thread switch interval"; see
|
||||
:func:`setswitchinterval`.
|
||||
|
||||
|
||||
.. function:: _getframe([depth])
|
||||
|
||||
Return a frame object from the call stack. If optional integer *depth* is
|
||||
|
@ -626,6 +635,11 @@ always available.
|
|||
performance for programs using threads. Setting it to a value ``<=`` 0 checks
|
||||
every virtual instruction, maximizing responsiveness as well as overhead.
|
||||
|
||||
.. deprecated:: 3.2
|
||||
This function doesn't have an effect anymore, as the internal logic
|
||||
for thread switching and asynchronous tasks has been rewritten.
|
||||
Use :func:`setswitchinterval` instead.
|
||||
|
||||
|
||||
.. function:: setdefaultencoding(name)
|
||||
|
||||
|
@ -689,6 +703,17 @@ always available.
|
|||
limit can lead to a crash.
|
||||
|
||||
|
||||
.. function:: setswitchinterval(interval)
|
||||
|
||||
Set the interpreter's thread switch interval (in seconds). This floating-point
|
||||
value determines the ideal duration of the "timeslices" allocated to
|
||||
concurrently running Python threads. Please note that the actual value
|
||||
can be higher, especially if long-running internal functions or methods
|
||||
are used. Also, which thread becomes scheduled at the end of the interval
|
||||
is the operating system's decision. The interpreter doesn't have its
|
||||
own scheduler.
|
||||
|
||||
|
||||
.. function:: settrace(tracefunc)
|
||||
|
||||
.. index::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue