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

Replace wasm-timer with custom implementation #17

Closed
wants to merge 2 commits into from

Conversation

lynn
Copy link

@lynn lynn commented Jul 29, 2024

wasm-timer does not support Web Workers and is considered deprecated by its author: tomaka/wasm-timer#21 (comment)

In src/delay.rs I write a sort of "polyfill" for wasm_timer::Delay that uses async_std on native platforms and js_sys in the browser. The Window vs. WorkerGlobalScope stuff is the crucial change needed to support Web Workers.

@lynn
Copy link
Author

lynn commented Jul 29, 2024

Actually #12 is a better fix. :)

@lynn lynn closed this Jul 29, 2024
@softprops
Copy link
Owner

Thanks for the nudge on that one

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