-
Notifications
You must be signed in to change notification settings - Fork 61
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
How to progress promises #124
Comments
From the discord I have learned that It would be wonderful to be able to poll manually again. |
I went back in time to find the implementation body of #[deprecated]
pub fn promise_loop_poll(&mut self) {
unsafe {
let rt = self.rt();
let mut pctx: *mut JSContext = 0 as *mut JSContext;
loop {
let err = JS_ExecutePendingJob(rt, (&mut pctx) as *mut *mut JSContext);
if err <= 0 {
if err < 0 {
js_std_dump_error(pctx);
}
break;
}
}
}
} I ask for this method to be put back and not removed. |
Ok, I will restore it. |
I see that
promise_loop_poll
is deprecated, though the examples show its usage. I am running into problems with promises, I don't see how to get them to progress. I have wasmedge-quickjs embedded in my own Rust program compiled to Wasm.Any help would be appreciated, thank you! And it would be great for those examples to show the up-to-date usage.
The text was updated successfully, but these errors were encountered: