Cherry-picked from PR #2290 by @Mibayy. Closes #2138. When asyncio.run() raises RuntimeError (running loop exists), the coroutine was created but never awaited, producing a RuntimeWarning on GC. Extract coro before try, call coro.close() in the except branch before falling back to ThreadPoolExecutor.