Skip to content

Fix RuntimeError when calling asyncio.run in an existing event loop#210

Open
amh4r wants to merge 1 commit intoskyflowapi:mainfrom
amh4r:add-run_coro
Open

Fix RuntimeError when calling asyncio.run in an existing event loop#210
amh4r wants to merge 1 commit intoskyflowapi:mainfrom
amh4r:add-run_coro

Conversation

@amh4r
Copy link

@amh4r amh4r commented Nov 3, 2025

Fix the RuntimeError that occurs when an event loop already exists. This happens because you can't call asyncio.run when an event loop already exists in the thread.

This change uses ThreadPoolExecutor to instead run asyncio.run in a separate thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant