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

Can't stop a runaway query without killing the app #98

Closed
ChristopherHaws opened this issue Oct 10, 2023 · 4 comments
Closed

Can't stop a runaway query without killing the app #98

ChristopherHaws opened this issue Oct 10, 2023 · 4 comments
Assignees

Comments

@ChristopherHaws
Copy link
Sponsor

I'm unable to stop a runaway query without closing NetPad. It seems to only happen when logging to the console or using .Dump().

Minimal Repro

while (true) {
    Console.WriteLine(DateTime.Now);
}
@tareqimbasher
Copy link
Owner

Thanks for reporting. Will take a look.

@tareqimbasher tareqimbasher self-assigned this Oct 25, 2023
tareqimbasher added a commit that referenced this issue Nov 15, 2023
The change introduces:
- Throttles pushing script output messages to IPC client
- Limits max number of script output messages to push to IPC client in a single script run
- Script output messages will be cancelled when a script environment stops, effectively cancelling sending script output messages to IPC client
- Optimizations in rendering output within SPA. Rendering is now debounced and pre-rendering work is more optimized
@tareqimbasher
Copy link
Owner

tareqimbasher commented Nov 15, 2023

So this started me down a rabbit hole and finally had me focus on making some planned, and overdue, design changes to how script output is rendered. #112 introduces a number of changes and enhancements that include fixing this issue. It will go out with next release.

It also, under the hood, lays down the foundation to introducing more Dump capabilities like dumping controls in the future.

@tareqimbasher tareqimbasher linked a pull request Nov 15, 2023 that will close this issue
@tareqimbasher tareqimbasher removed a link to a pull request Nov 15, 2023
@tareqimbasher
Copy link
Owner

Will keep open till new version is released

@tareqimbasher tareqimbasher reopened this Nov 16, 2023
@tareqimbasher
Copy link
Owner

Closing with publish of new v0.6.0 release.

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

No branches or pull requests

2 participants