Message358296
Thanks for letting us know, janust. I confirmed that `asyncio.TimeoutError` no longer works for the code example in 3.8 and that replacing it with `concurrent.futures.TimeoutError` works correctly.
Before moving forward with a PR to the docs, I think we should wait for feedback from Yury to check if this behavior is intentional for `run_coroutine_threadsafe()`, I'll add him to the nosy list.
To me, this seems more like a side effect of `asyncio.TimeoutError` being changed to BaseException rather than an intended consequence. The main purpose of that change was to ensure that TimeoutError wasn't unintentionally suppressed by generic try-except blocks. IMO, it seems rather counter-intuitive to have to specify `concurrent.futures.TimeoutError` when using a timeout for the future returned by `run_coroutine_threadsafe()`. I'm not certain that it can be avoided though, other than by changing it to return an instance of asyncio.Future instead of concurrent.futures.Future. |
|
Date |
User |
Action |
Args |
2019-12-12 09:41:20 | aeros | set | recipients:
+ aeros, docs@python, yselivanov, janust |
2019-12-12 09:41:20 | aeros | set | messageid: <1576143680.44.0.98191602083.issue39027@roundup.psfhosted.org> |
2019-12-12 09:41:20 | aeros | link | issue39027 messages |
2019-12-12 09:41:19 | aeros | create | |
|