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
e8963912
Kaydet (Commit)
e8963912
authored
Eki 24, 2016
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge heads
üst
cb637fa2
01c521ba
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
futures.py
Lib/asyncio/futures.py
+7
-2
test_futures.py
Lib/test/test_asyncio/test_futures.py
+0
-0
No files found.
Lib/asyncio/futures.py
Dosyayı görüntüle @
e8963912
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__all__
=
[
'CancelledError'
,
'TimeoutError'
,
__all__
=
[
'CancelledError'
,
'TimeoutError'
,
'InvalidStateError'
,
'InvalidStateError'
,
'Future'
,
'wrap_future'
,
'Future'
,
'wrap_future'
,
'isfuture'
]
]
import
concurrent.futures._base
import
concurrent.futures._base
...
@@ -389,6 +389,10 @@ class Future:
...
@@ -389,6 +389,10 @@ class Future:
__await__
=
__iter__
# make compatible with 'await' expression
__await__
=
__iter__
# make compatible with 'await' expression
# Needed for testing purposes.
_PyFuture
=
Future
def
_set_result_unless_cancelled
(
fut
,
result
):
def
_set_result_unless_cancelled
(
fut
,
result
):
"""Helper setting the result only if the future was not cancelled."""
"""Helper setting the result only if the future was not cancelled."""
if
fut
.
cancelled
():
if
fut
.
cancelled
():
...
@@ -488,4 +492,5 @@ try:
...
@@ -488,4 +492,5 @@ try:
except
ImportError
:
except
ImportError
:
pass
pass
else
:
else
:
Future
=
_asyncio
.
Future
# _CFuture is needed for tests.
Future
=
_CFuture
=
_asyncio
.
Future
Lib/test/test_asyncio/test_futures.py
Dosyayı görüntüle @
e8963912
This diff is collapsed.
Click to expand it.
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