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

Feat: Implement stop button in multicore mode #797

Merged
merged 3 commits into from
Sep 20, 2024
Merged

Conversation

marcustyphoon
Copy link
Collaborator

This implements the stop calculation button, but not the resume button, in the multicore rust mode.

It stops the calculation by terminating the active workers from the main thread and creating new ones. This obviously isn't as elegant as having the Rust code actually pause and let handlers run to check if it's received a message every so often (probably doable with wasm_bindgen_futures or whatever), but I don't know how to do that and this is at least better than having to refresh the page and lose your whole state.

Copy link
Contributor

github-actions bot commented Sep 20, 2024

Deployed preview build to Cloudflare!

Last commit: f48bdb1
Preview URL: https://c1dfe11f.discretize-gear-optimizer.pages.dev
Branch Preview URL: https://stop-rust-2.discretize-gear-optimizer.pages.dev

[skip ci]
@marcustyphoon marcustyphoon merged commit 93a0c2f into main Sep 20, 2024
@marcustyphoon marcustyphoon deleted the stop-rust-2 branch September 20, 2024 12:54
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.

1 participant