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
9b0d1d64
Kaydet (Commit)
9b0d1d64
authored
Agu 09, 2017
tarafından
Serhiy Storchaka
Kaydeden (comit)
GitHub
Agu 09, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-31070: Fix a race condition in importlib _get_module_lock(). (#3033)
üst
88eee44a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
_bootstrap.py
Lib/importlib/_bootstrap.py
+12
-2
2017-08-09-09-40-54.bpo-31070.oDyLiI.rst
...ore and Builtins/2017-08-09-09-40-54.bpo-31070.oDyLiI.rst
+1
-0
importlib.h
Python/importlib.h
+0
-0
No files found.
Lib/importlib/_bootstrap.py
Dosyayı görüntüle @
9b0d1d64
...
...
@@ -172,8 +172,18 @@ def _get_module_lock(name):
lock
=
_DummyModuleLock
(
name
)
else
:
lock
=
_ModuleLock
(
name
)
def
cb
(
_
):
del
_module_locks
[
name
]
def
cb
(
ref
,
name
=
name
):
_imp
.
acquire_lock
()
try
:
# bpo-31070: Check if another thread created a new lock
# after the previous lock was destroyed
# but before the weakref callback was called.
if
_module_locks
.
get
(
name
)
is
ref
:
del
_module_locks
[
name
]
finally
:
_imp
.
release_lock
()
_module_locks
[
name
]
=
_weakref
.
ref
(
lock
,
cb
)
finally
:
_imp
.
release_lock
()
...
...
Misc/NEWS.d/next/Core and Builtins/2017-08-09-09-40-54.bpo-31070.oDyLiI.rst
0 → 100644
Dosyayı görüntüle @
9b0d1d64
Fix a race condition in importlib _get_module_lock().
Python/importlib.h
Dosyayı görüntüle @
9b0d1d64
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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