Merge 3.4 (asyncio)
This commit is contained in:
commit
5b511a0b1e
|
@ -636,7 +636,7 @@ class BaseEventLoop(events.AbstractEventLoop):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
yield from waiter
|
yield from waiter
|
||||||
except Exception:
|
except:
|
||||||
transport.close()
|
transport.close()
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
|
@ -163,6 +163,9 @@ class _WaitCancelFuture(_BaseWaitHandleFuture):
|
||||||
|
|
||||||
self._done_callback = None
|
self._done_callback = None
|
||||||
|
|
||||||
|
def cancel(self):
|
||||||
|
raise RuntimeError("_WaitCancelFuture must not be cancelled")
|
||||||
|
|
||||||
def _schedule_callbacks(self):
|
def _schedule_callbacks(self):
|
||||||
super(_WaitCancelFuture, self)._schedule_callbacks()
|
super(_WaitCancelFuture, self)._schedule_callbacks()
|
||||||
if self._done_callback is not None:
|
if self._done_callback is not None:
|
||||||
|
@ -693,6 +696,9 @@ class IocpProactor:
|
||||||
# FIXME: Tulip issue 196: remove this case, it should not happen
|
# FIXME: Tulip issue 196: remove this case, it should not happen
|
||||||
elif fut.done() and not fut.cancelled():
|
elif fut.done() and not fut.cancelled():
|
||||||
del self._cache[address]
|
del self._cache[address]
|
||||||
|
elif isinstance(fut, _WaitCancelFuture):
|
||||||
|
# _WaitCancelFuture must not be cancelled
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
fut.cancel()
|
fut.cancel()
|
||||||
|
|
Loading…
Reference in New Issue