Skip to content

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