-
-
Notifications
You must be signed in to change notification settings - Fork 381
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
feat: Run exec_request inside a task #1384
base: main
Are you sure you want to change the base?
Conversation
…ute_request in separate task
Thanks @fleming79. |
6e33f7d
to
5f71eaa
Compare
… processing shell messages.
@davidbrochart - thank you for the review and positive feedback! I've updated the code so it will now cancel all requests where the submitted (monotonic) time is prior to the aborted time. |
…l_control_messages
…e kernel and drop old integration code.
… for non-execute requests.
Here is a demo video showing a forked version of ipylab using await extensively. The modified version of ipylab defines async functions to communicate with the frontend via custom widget messages ( ipylab.async.everywhere.demo.mp4 |
This PR modifies the kernel to run exec_requests inside a task using Memory object streams to queue pending tasks. This means that other shell messages can be processed while the execution request is being processed.
ref: jupyterlab/jupyterlab#17363 (comment)
New features
start_soon
method to the kernel providing a thread safe equivalent to anyio.start_soon.Breaking changes
set_parent
&get_parent
methods are removed. Instead the parent message is only set for the current execute request providing better certainty for inputs and outputsKnown issues
Example
Screenshot
Before
ipykernel.demo.before.mp4
After
ipykernel.demo.after.mp4
Notebook code
Requires: