gh-92841: Fix asyncio's RuntimeError: Event loop is closed (GH-92842) (GH-92904)

(cherry picked from commit 33880b4b1c60f54aa9e7fa02698a3c82eafe3dc7)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2 files changed