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

Feature flag to keep thread alive #21

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

vizigr0u
Copy link

While #18 is being discussed, this PR addresses one point which is only about closing the worker after the wasm entry point call.

This allows calling methods such as request_animation_frame, set_interval etc.

The responsibility to close the worker is passed to the user, with the helper function close_current_web_worker

@chemicstry
Copy link
Owner

Thanks for the PR!

However, since this is a temporary workaround until proper async entry point is implemented, I'm not very keen on merging it. But lets keep it open so people have something to patch in the meantime.

Tip for anyone wanting to use this (add to Cargo.toml):

[patch.crates-io]
wasm_thread = { git = "https://github.com/vizigr0u/wasm_thread", rev = "90c7f2b", features = ["keep_worker_alive"] }

@vizigr0u
Copy link
Author

Tip for anyone wanting to use this (add to Cargo.toml):

[patch.crates-io]
wasm_thread = { git = "https://github.com/vizigr0u/wasm_thread", rev = "90c7f2b", features = ["keep_worker_alive"] }

Thank you, this is very useful

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