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
4357cf62
Kaydet (Commit)
4357cf62
authored
Eyl 15, 2016
tarafından
Yury Selivanov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Another asyncio sync.
üst
f6d991d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
base_events.py
Lib/asyncio/base_events.py
+5
-4
tasks.py
Lib/asyncio/tasks.py
+6
-1
No files found.
Lib/asyncio/base_events.py
Dosyayı görüntüle @
4357cf62
...
...
@@ -13,7 +13,6 @@ conscious design decision, leaving the door open for keyword arguments
to modify the meaning of the API call itself.
"""
import
collections
import
concurrent.futures
import
heapq
...
...
@@ -1128,7 +1127,7 @@ class BaseEventLoop(events.AbstractEventLoop):
transport
=
yield
from
self
.
_make_subprocess_transport
(
protocol
,
cmd
,
True
,
stdin
,
stdout
,
stderr
,
bufsize
,
**
kwargs
)
if
self
.
_debug
:
logger
.
info
(
'
%
s:
%
r'
%
(
debug_log
,
transport
)
)
logger
.
info
(
'
%
s:
%
r'
,
debug_log
,
transport
)
return
transport
,
protocol
@coroutine
...
...
@@ -1158,7 +1157,7 @@ class BaseEventLoop(events.AbstractEventLoop):
protocol
,
popen_args
,
False
,
stdin
,
stdout
,
stderr
,
bufsize
,
**
kwargs
)
if
self
.
_debug
:
logger
.
info
(
'
%
s:
%
r'
%
(
debug_log
,
transport
)
)
logger
.
info
(
'
%
s:
%
r'
,
debug_log
,
transport
)
return
transport
,
protocol
def
get_exception_handler
(
self
):
...
...
@@ -1238,7 +1237,9 @@ class BaseEventLoop(events.AbstractEventLoop):
- 'handle' (optional): Handle instance;
- 'protocol' (optional): Protocol instance;
- 'transport' (optional): Transport instance;
- 'socket' (optional): Socket instance.
- 'socket' (optional): Socket instance;
- 'asyncgen' (optional): Asynchronous generator that caused
the exception.
New keys maybe introduced in the future.
...
...
Lib/asyncio/tasks.py
Dosyayı görüntüle @
4357cf62
...
...
@@ -519,7 +519,7 @@ def sleep(delay, result=None, *, loop=None):
h
.
cancel
()
def
async
(
coro_or_future
,
*
,
loop
=
None
):
def
async
_
(
coro_or_future
,
*
,
loop
=
None
):
"""Wrap a coroutine in a future.
If the argument is a Future, it is returned directly.
...
...
@@ -532,6 +532,11 @@ def async(coro_or_future, *, loop=None):
return
ensure_future
(
coro_or_future
,
loop
=
loop
)
# Silence DeprecationWarning:
globals
()[
'async'
]
=
async_
async_
.
__name__
=
'async'
del
async_
def
ensure_future
(
coro_or_future
,
*
,
loop
=
None
):
"""Wrap a coroutine or an awaitable in a future.
...
...
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