Skip to content

Is there any easy way to send_message after a promise #3036

Answered by WorldSEnder
whizsid asked this question in Q&A
Discussion options

You must be logged in to vote

Scope::send_future should be what you are after:

scope.send_future(async move {
    wasm_bindgen_futures::JsFuture::from(promise).await.unwrap();
    message
})

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by whizsid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants