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

[WIP] Remove async send_signal method, defer to subclass #530

Closed

Conversation

kevin-bates
Copy link
Member

After validating the downstream modules that can use async kernel
management (notebook and enterprise-gateway) it was found that
the async send_signal method was not warranted since it doesn't
return an awaitable and deferring to the subclass's sync version is fine.

I'm fairly certain this is the last of the "touch-ups" for the async kernel management changes. Thanks for your patience.

After validating the downstream modules that can use async kernel
management (notebook and enterprise-gateway) it was found that
the async send_signal method was not warranted since it doesn't
return an awaitable.
@davidbrochart
Copy link
Member

No problem @kevin-bates, iterating is necessary.
However when I suggested to not implement signal_kernel as a coroutine, you said rightfully that other implementations (those managing remote kernels) could be async.
Note that even though signal_kernel doesn't await on anything in this implementation, it is still a valid coroutine and works as fine as making it a blocking function and not awaiting on it (I mean, it doesn't hurt to leave it async).

@kevin-bates kevin-bates changed the title Remove async send_signal method, defer to subclass [WIP] Remove async send_signal method, defer to subclass Mar 13, 2020
@kevin-bates
Copy link
Member Author

Thanks for questioning this @davidbrochart. yes, I remember that comment and forgot to reference it in the PR description. Having this be async was causing failures in Enterprise Gateway leading to NoneType can't be used in 'await' expression. I'll keep looking and have moved this to WIP in the meantime.

@davidbrochart
Copy link
Member

Then it probably means you have your own implementation of signal_kernel in Enterprise Gateway, which is not async.

@kevin-bates
Copy link
Member Author

Damn, you're spot on - found that just prior to reading your response! I'll likely close this PR, but want to run more tests again.

@kevin-bates
Copy link
Member Author

Thank you! That was indeed the issue. Closing now.

@kevin-bates kevin-bates deleted the finalize-async-subclasses branch March 13, 2020 15:09
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.

2 participants