mirror of https://github.com/python/cpython
Doc: Fix wrong exception used in example. (GH-26572)
This commit is contained in:
parent
58248d9437
commit
15f0fc571c
|
@ -763,7 +763,7 @@ Scheduling From Other Threads
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = future.result(timeout)
|
result = future.result(timeout)
|
||||||
except asyncio.TimeoutError:
|
except concurrent.futures.TimeoutError:
|
||||||
print('The coroutine took too long, cancelling the task...')
|
print('The coroutine took too long, cancelling the task...')
|
||||||
future.cancel()
|
future.cancel()
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
|
Loading…
Reference in New Issue