-
Notifications
You must be signed in to change notification settings - Fork 82
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
Reloading with busy runtime looks frozen, breaks LSP #1243
Comments
I see exactly the same behaviour in Python |
This is necessary for Posit Workbench support; without it, if you close the browser while a computation is running and later reconnect, Python/R will be frozen until the computation is completed. This is very undesirable. |
I have a change on a branch that addresses this using the new Jupyter kernel supervisor. |
Update: In my testing this works OK for Python. R is better -- it does wait to reattach the LSP until R isn't busy -- but when it does reattach the LSP it crashes ark. This may be an ark bug or may be an ordering issue we can/should resolve on the Positron side. |
Ready to verify for Python; I'll open a separate bug for R as noted above. Note that you'll need to enable the new supervisor to verify! |
With the new supervisor enabled, it now waits for the running command to finish, and pops a toast message . |
To reproduce:
Sys.sleep(60)
or another long-running commandIt looks like you can run another R command, but you can't. The runtime appears to be frozen.
Screen.Recording.2023-09-05.at.3.51.32.PM.mov
Shortly after reload, the LSP also fails to start:
The source of both of these problems is that Positron is trying to reconnect to a runtime that is busy running code, but Positron doesn't know it's busy running code. Consequently we don't show any busy UI, we offer an input prompt, and we try to start the LSP (which is not something you can do during a computation, at least not in R).
The right solution to this probably requires an intermediary layer (as in #1155), but perhaps as a stopgap we can implement it directly in the language packs in some way.
The text was updated successfully, but these errors were encountered: