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
707f228b
Kaydet (Commit)
707f228b
authored
Tem 15, 2011
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Try harder to reap dangling threads in test.support.reap_threads().
üst
c081c0c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
support.py
Lib/test/support.py
+13
-6
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/test/support.py
Dosyayı görüntüle @
707f228b
...
...
@@ -24,9 +24,15 @@ import sysconfig
import
logging.handlers
try
:
import
_thread
import
_thread
,
threading
except
ImportError
:
_thread
=
None
threading
=
None
try
:
import
multiprocessing.process
except
ImportError
:
multiprocessing
=
None
__all__
=
[
"Error"
,
"TestFailed"
,
"ResourceDenied"
,
"import_module"
,
...
...
@@ -1275,19 +1281,20 @@ def modules_cleanup(oldmodules):
def
threading_setup
():
if
_thread
:
return
_thread
.
_count
(),
return
_thread
.
_count
(),
threading
.
_dangling
.
copy
()
else
:
return
1
,
return
1
,
()
def
threading_cleanup
(
nb_thread
s
):
def
threading_cleanup
(
*
original_value
s
):
if
not
_thread
:
return
_MAX_COUNT
=
10
for
count
in
range
(
_MAX_COUNT
):
n
=
_thread
.
_count
()
if
n
==
nb_thread
s
:
values
=
_thread
.
_count
(),
threading
.
_dangling
if
values
==
original_value
s
:
break
time
.
sleep
(
0.1
)
gc_collect
()
# XXX print a warning in case of failure?
def
reap_threads
(
func
):
...
...
Misc/NEWS
Dosyayı görüntüle @
707f228b
...
...
@@ -67,6 +67,8 @@ C-API
Tests
-----
- Try harder to reap dangling threads in test.support.reap_threads().
- Issue #12573: Add resource checks for dangling Thread and Process objects.
- Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
...
...
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