Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
d42bc519
Kaydet (Commit)
d42bc519
authored
Kas 10, 2009
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add a couple of words about the new GIL implementation
üst
aee355b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
sys.rst
Doc/library/sys.rst
+25
-0
3.2.rst
Doc/whatsnew/3.2.rst
+21
-0
No files found.
Doc/library/sys.rst
Dosyayı görüntüle @
d42bc519
...
...
@@ -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::
...
...
Doc/whatsnew/3.2.rst
Dosyayı görüntüle @
d42bc519
...
...
@@ -85,6 +85,27 @@ New, Improved, and Deprecated Modules
(Contributed by Georg Brandl and Mattias Brändström;
`appspot issue 53094 <http://codereview.appspot.com/53094>`_.)
Multi-threading
===============
* The mechanism for serializing execution of concurrently running Python
threads (generally known as the GIL or Global Interpreter Lock) has been
rewritten. Among the objectives were more predictable switching intervals
and reduced overhead due to lock contention and the number of ensuing
system calls. The notion of a "check interval" to allow thread switches
has been abandoned and replaced by an absolute duration expressed in
seconds. This parameter is tunable through :func:`sys.setswitchinterval()`.
It currently defaults to 5 milliseconds.
Additional details about the implementation can be read from a `python-dev
mailing-list message
<http://mail.python.org/pipermail/python-dev/2009-October/093321.html>`_
(however, "priority requests" as exposed in this message have not been
kept for inclusion).
(Contributed by Antoine Pitrou)
Optimizations
=============
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment