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
bf2b3b72
Kaydet (Commit)
bf2b3b72
authored
May 30, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use test.support.start_threads() in threaded lru_cache tests.
üst
8b2e8b6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
test_functools.py
Lib/test/test_functools.py
+9
-18
No files found.
Lib/test/test_functools.py
Dosyayı görüntüle @
bf2b3b72
...
...
@@ -1120,14 +1120,10 @@ class TestLRU:
sys
.
setswitchinterval
(
1e-6
)
try
:
# create 5 threads in order to fill cache
threads
=
[]
for
k
in
range
(
5
):
t
=
threading
.
Thread
(
target
=
full
,
args
=
[
f
,
k
,
k
])
t
.
start
()
threads
.
append
(
t
)
for
t
in
threads
:
t
.
join
()
threads
=
[
threading
.
Thread
(
target
=
full
,
args
=
[
f
,
k
,
k
])
for
k
in
range
(
5
)]
with
support
.
start_threads
(
threads
):
pass
hits
,
misses
,
maxsize
,
currsize
=
f
.
cache_info
()
self
.
assertEqual
(
hits
,
45
)
...
...
@@ -1135,16 +1131,11 @@ class TestLRU:
self
.
assertEqual
(
currsize
,
5
)
# create 5 threads in order to fill cache and 1 to clear it
cleaner
=
threading
.
Thread
(
target
=
clear
,
args
=
[
f
])
cleaner
.
start
()
threads
=
[
cleaner
]
for
k
in
range
(
5
):
t
=
threading
.
Thread
(
target
=
full
,
args
=
[
f
,
k
,
k
])
t
.
start
()
threads
.
append
(
t
)
for
t
in
threads
:
t
.
join
()
threads
=
[
threading
.
Thread
(
target
=
clear
,
args
=
[
f
])]
threads
+=
[
threading
.
Thread
(
target
=
full
,
args
=
[
f
,
k
,
k
])
for
k
in
range
(
5
)]
with
support
.
start_threads
(
threads
):
pass
finally
:
sys
.
setswitchinterval
(
orig_si
)
...
...
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