Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use supported event loop behavior #382

Closed
wants to merge 12 commits into from

Conversation

blink1073
Copy link
Contributor

@blink1073 blink1073 commented Dec 26, 2023

Based on discussion in python/cpython#100160, we should not be relying on asyncio.get_event_loop, since they are in fact going to make it an alias for asyncio.get_running_loop.

As of #381, we are starting the event loop before instantiating our apps, so we should not see any more issues like jupyter/notebook#6721.

Based on results in ipython/ipykernel#1184, we'll want to normally use the default event loop on Windows, unless we know we're running a tornado app. This PR adds a prefer_selector_loop option to get_event_loop so we can override _prefer_selector_loop in jupyter_server apps to prefer the selector loop.

@blink1073 blink1073 changed the title debug event loop Use supported event loop behavior Dec 26, 2023
@blink1073 blink1073 marked this pull request as ready for review December 26, 2023 23:00
@blink1073
Copy link
Contributor Author

I'm going to close this in light of #385. After we fix #384 and release, I'll make a new PR that ensures we are handling the problems raised in #383.

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

Successfully merging this pull request may close these issues.

1 participant