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

process_one only accepts coroutines for dispatch #861

Merged
merged 1 commit into from Feb 15, 2022

Conversation

minrk
Copy link
Member

@minrk minrk commented Feb 11, 2022

closes #860

alternately: make the await dispatch check inspect.isawaitable before awaiting.

@blink1073
Copy link
Member

I'm not sure how asyncio handles an async function that is used as a callback to call_later, it doesn't say in the docs. I think the alternate approach you mentioned is safer.

@minrk
Copy link
Member Author

minrk commented Feb 15, 2022

call_later isn't getting an async function to call. call_later is being passed the synchronous schedule_dispatch function to call, with the async function passed as an argument, eventually to be called and awaited by us here.

@blink1073
Copy link
Member

Ah, understood, thanks!

@blink1073 blink1073 merged commit c27e5b9 into ipython:main Feb 15, 2022
@minrk minrk deleted the quickfix-abort-queues branch February 17, 2022 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IPykernel 6.9.0 generates error when Python errors are returned after execution
2 participants