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
156307bf
Kaydet (Commit)
156307bf
authored
Nis 04, 2014
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #21149: Improved thread-safety in logging cleanup during interpreter shutdown.
üst
b30b34c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
__init__.py
Lib/logging/__init__.py
+9
-8
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/logging/__init__.py
Dosyayı görüntüle @
156307bf
...
...
@@ -711,16 +711,17 @@ def _removeHandlerRef(wr):
Remove a handler reference from the internal cleanup list.
"""
# This function can be called during module teardown, when globals are
# set to None. If _acquireLock is None, assume this is the case and do
# nothing.
if
(
_acquireLock
is
not
None
and
_handlerList
is
not
None
and
_releaseLock
is
not
None
):
_acquireLock
()
# set to None. It can also be called from another thread. So we need to
# pre-emptively grab the necessary globals and check if they're None,
# to prevent race conditions and failures during interpreter shutdown.
acquire
,
release
,
handlers
=
_acquireLock
,
_releaseLock
,
_handlerList
if
acquire
and
release
and
handlers
:
acquire
()
try
:
if
wr
in
_handlerList
:
_handlerList
.
remove
(
wr
)
if
wr
in
handlers
:
handlers
.
remove
(
wr
)
finally
:
_releaseLock
()
release
()
def
_addHandlerRef
(
handler
):
"""
...
...
Misc/NEWS
Dosyayı görüntüle @
156307bf
...
...
@@ -27,6 +27,9 @@ Core and Builtins
Library
-------
- Issue #21149: Improved thread-safety in logging cleanup during interpreter
shutdown. Thanks to Devin Jeanpierre for the patch.
- Issue #20145: `assertRaisesRegex` and `assertWarnsRegex` now raise a
TypeError if the second argument is not a string or compiled regex.
...
...
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