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
fdccfe09
Unverified
Kaydet (Commit)
fdccfe09
authored
May 28, 2018
tarafından
Yury Selivanov
Kaydeden (comit)
GitHub
May 28, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-33469: RuntimeError after closing loop that used run_in_executor (GH-7171)
üst
f9b364fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
futures.py
Lib/asyncio/futures.py
+3
-0
test_events.py
Lib/test/test_asyncio/test_events.py
+18
-0
2018-05-28-15-55-12.bpo-33469.hmXBpY.rst
...S.d/next/Library/2018-05-28-15-55-12.bpo-33469.hmXBpY.rst
+1
-0
No files found.
Lib/asyncio/futures.py
Dosyayı görüntüle @
fdccfe09
...
...
@@ -353,6 +353,9 @@ def _chain_future(source, destination):
source_loop
.
call_soon_threadsafe
(
source
.
cancel
)
def
_call_set_state
(
source
):
if
(
destination
.
cancelled
()
and
dest_loop
is
not
None
and
dest_loop
.
is_closed
()):
return
if
dest_loop
is
None
or
dest_loop
is
source_loop
:
_set_state
(
destination
,
source
)
else
:
...
...
Lib/test/test_asyncio/test_events.py
Dosyayı görüntüle @
fdccfe09
...
...
@@ -347,6 +347,24 @@ class EventLoopTestsMixin:
self
.
assertEqual
(
res
,
'yo'
)
self
.
assertNotEqual
(
thread_id
,
threading
.
get_ident
())
def
test_run_in_executor_cancel
(
self
):
called
=
False
def
patched_call_soon
(
*
args
):
nonlocal
called
called
=
True
def
run
():
time
.
sleep
(
0.05
)
f2
=
self
.
loop
.
run_in_executor
(
None
,
run
)
f2
.
cancel
()
self
.
loop
.
close
()
self
.
loop
.
call_soon
=
patched_call_soon
self
.
loop
.
call_soon_threadsafe
=
patched_call_soon
time
.
sleep
(
0.4
)
self
.
assertFalse
(
called
)
def
test_reader_callback
(
self
):
r
,
w
=
socket
.
socketpair
()
r
.
setblocking
(
False
)
...
...
Misc/NEWS.d/next/Library/2018-05-28-15-55-12.bpo-33469.hmXBpY.rst
0 → 100644
Dosyayı görüntüle @
fdccfe09
Fix RuntimeError after closing loop that used run_in_executor
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