Skip to content

Update async_sleep to be non-web compatible#91

Open
dangeross wants to merge 1 commit intoBlockstream:masterfrom
breez:savage-fix-async-sleep
Open

Update async_sleep to be non-web compatible#91
dangeross wants to merge 1 commit intoBlockstream:masterfrom
breez:savage-fix-async-sleep

Conversation

@dangeross
Copy link
Contributor

The usage of web_sys::window for the Wasm async_sleep fn is causing non-web use (e.g. node.js) to panic. This PR replaces the use of web_sys::window with tokio_with_wasm, which replaces the tokio sleep fn with a Wasm compatible fn.

@RCasatta
Copy link
Contributor

Any way to make this work without requiring 2024 edition?

We can also decide to switch to 2024 edition instead, but if it's easy to stay on older version I think it's preferable for now

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