diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2009-11-10 23:18:31 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-11-10 23:18:31 (GMT) |
commit | d42bc519d2e15d1ecca8f6fcee65113b64a4131b (patch) | |
tree | a010ba81d0048f567e33673e8f8451244e7b1d9b /Doc/library/sys.rst | |
parent | aee355b7b54128ff17f8d642e3733b796e0ae7d5 (diff) | |
download | cpython-d42bc519d2e15d1ecca8f6fcee65113b64a4131b.zip cpython-d42bc519d2e15d1ecca8f6fcee65113b64a4131b.tar.gz cpython-d42bc519d2e15d1ecca8f6fcee65113b64a4131b.tar.bz2 |
Add a couple of words about the new GIL implementation
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r-- | Doc/library/sys.rst | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 82e978e..5d1a7c0 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -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:: |