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
97cf0828
Kaydet (Commit)
97cf0828
authored
Eki 13, 2018
tarafından
Andrew Svetlov
Kaydeden (comit)
Miss Islington (bot)
Eki 13, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-34970: Protect tasks weak set manipulation in asyncio.all_tasks() (GH-9837)
https://bugs.python.org/issue34970
üst
1a997eb2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
tasks.py
Lib/asyncio/tasks.py
+6
-2
2018-10-13-11-14-13.bpo-34970.SrJTY7.rst
...S.d/next/Library/2018-10-13-11-14-13.bpo-34970.SrJTY7.rst
+1
-0
No files found.
Lib/asyncio/tasks.py
Dosyayı görüntüle @
97cf0828
...
...
@@ -42,7 +42,9 @@ def all_tasks(loop=None):
"""Return a set of all tasks for the loop."""
if
loop
is
None
:
loop
=
events
.
get_running_loop
()
return
{
t
for
t
in
_all_tasks
# NB: set(_all_tasks) is required to protect
# from https://bugs.python.org/issue34970 bug
return
{
t
for
t
in
list
(
_all_tasks
)
if
futures
.
_get_loop
(
t
)
is
loop
and
not
t
.
done
()}
...
...
@@ -52,7 +54,9 @@ def _all_tasks_compat(loop=None):
# method.
if
loop
is
None
:
loop
=
events
.
get_event_loop
()
return
{
t
for
t
in
_all_tasks
if
futures
.
_get_loop
(
t
)
is
loop
}
# NB: set(_all_tasks) is required to protect
# from https://bugs.python.org/issue34970 bug
return
{
t
for
t
in
list
(
_all_tasks
)
if
futures
.
_get_loop
(
t
)
is
loop
}
def
_set_task_name
(
task
,
name
):
...
...
Misc/NEWS.d/next/Library/2018-10-13-11-14-13.bpo-34970.SrJTY7.rst
0 → 100644
Dosyayı görüntüle @
97cf0828
Protect tasks weak set manipulation in ``asyncio.all_tasks()``
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