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
b186f1df
Kaydet (Commit)
b186f1df
authored
Eki 04, 2014
tarafından
R David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#11866: Eliminate race condition in the computation of names for new threads.
Original patch by Peter Saveliev.
üst
e1618491
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
threading.py
Lib/threading.py
+4
-5
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/threading.py
Dosyayı görüntüle @
b186f1df
...
...
@@ -9,7 +9,7 @@ except ImportError:
from
time
import
time
as
_time
from
traceback
import
format_exc
as
_format_exc
from
_weakrefset
import
WeakSet
from
itertools
import
islice
as
_islice
from
itertools
import
islice
as
_islice
,
count
as
_count
try
:
from
_collections
import
deque
as
_deque
except
ImportError
:
...
...
@@ -726,11 +726,10 @@ class BrokenBarrierError(RuntimeError):
# Helper to generate new thread names
_counter
=
0
_counter
=
_count
()
.
__next__
_counter
()
# Consume 0 so first non-main thread has id 1.
def
_newname
(
template
=
"Thread-
%
d"
):
global
_counter
_counter
+=
1
return
template
%
_counter
return
template
%
_counter
()
# Active thread administration
_active_limbo_lock
=
_allocate_lock
()
...
...
Misc/NEWS
Dosyayı görüntüle @
b186f1df
...
...
@@ -22,6 +22,9 @@ Core and Builtins
Library
-------
- Issue #11866: Eliminated race condition in the computation of names
for new threads.
- Issue #21905: Avoid RuntimeError in pickle.whichmodule() when sys.modules
is mutated while iterating. Patch by Olivier Grisel.
...
...
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