Open
Description
Long story:
- We randomly get a run time error: "Single thread executor already being used, would deadlock"`.
- However, there was another error:
RuntimeError: cannot schedule new futures after shutdown
.
I started to investigate, but it was unclear what error caused this issue.
Even if it does not solve my bugs, I found that exception from loop.run_in_executor
in "SyncToAsync.call" results in marking deadlock_context
of SyncToAsync
set true forever. Of course, this code can not work anymore, but this error is hiding real issues.
Looks like this bug can not affect the correct execution, but I spent too much time to realise that there is no problem related to deadlocks in sync_to_async
.
Probably, I will be able to submit fix of it. It's pretty easy.
Metadata
Metadata
Assignees
Labels
No labels