The following deadlocks:
@pytest.mark.trio
async def test_raise_sleeping(self, loop):
def raise_exc():
raise Exception()
async def raise_sleeping():
loop.call_later(0.1, raise_exc)
await asyncio.sleep(0.2)
await trio_asyncio.aio_as_trio(raise_sleeping, loop=loop)()
It gets stuck in run_aio_future on wait_task_rescheduled after it hits abort_cb callback:
|
def abort_cb(raise_cancel_arg): |
|
# Save the cancel-raising function |
|
nonlocal raise_cancel |
|
raise_cancel = raise_cancel_arg |
|
# Attempt to cancel our future |
|
future.cancel() |
|
# Keep waiting |
|
return trio.lowlevel.Abort.FAILED |
|
|
|
try: |
|
res = await trio.lowlevel.wait_task_rescheduled(abort_cb) |
|
return res |
The problem exist at least since release 0.11.0.
#88 is potential similar.
(Extracted from #103.)
The following deadlocks:
It gets stuck in
run_aio_futureonwait_task_rescheduledafter it hitsabort_cbcallback:trio-asyncio/trio_asyncio/_util.py
Lines 34 to 45 in b93c320
The problem exist at least since release 0.11.0.
#88 is potential similar.
(Extracted from #103.)