Replies: 1 comment
-
https://github.com/napi-rs/napi-rs/blob/main/examples/napi/src/promise.rs#L4 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to await the result of a promise in Rust where I'd like the value returned to be a
JsUnknown
to avoid casting into Rust types unless the caller needs to.I have tried the naive implementation of using a channel to wait for a response from the callback
However this doesn't work because the receiver blocks the Js thread which prevents further Js execution thereby preventing the promise callback from running.
Any tips for this?
Beta Was this translation helpful? Give feedback.
All reactions