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

Add max_heap_size option and related error variant #229

Merged
merged 4 commits into from
Oct 18, 2024

Conversation

flightofthefox
Copy link
Contributor

For your consideration: this PR adds a new max_heap_size option to RuntimeOptions. Merging the provided setting into any existing isolate_options if given.

Using a CancellationToken to sync the termination across both inner and outer runtime, as just terminating the isolate leaves tokio hanging... needed to modify the on_block call to abort its inner future also.

LMK if you think it's useful, or if there's a better way to go about it.

@rscarson
Copy link
Owner

The only issue I see is that more recent versions of deno_cache pin tokio at 1.36.0

If you can use that version this is golden!

@flightofthefox
Copy link
Contributor Author

Ah yep. Pinned now. Hopefully deno will unpin soon given upstream fix. denoland/deno#24958 (comment)

@rscarson
Copy link
Owner

Seems one of the tests is failing in a very peculiar way

@flightofthefox
Copy link
Contributor Author

Seems one of the tests is failing in a very peculiar way

Hah yes. I was setting a very small heap (4MB) in the exhaustion test but that's no longer large enough to initialize the runtime with the updated deno deps 😅

@rscarson rscarson merged commit 988c196 into rscarson:master Oct 18, 2024
4 checks passed
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