-
Notifications
You must be signed in to change notification settings - Fork 110
Async refactor #574
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
base: master
Are you sure you want to change the base?
Async refactor #574
Conversation
|
@DelSkayn would be interested for your take on it, right now I want to say that the spawner is overcomplicated so I support a simpler event loop. Users also reported to me that some futures are not always making progress IG not awaited is js so this should help. |
|
This makes polling have The scheduler is somewhat complicated so that polling is |
|
@Sytten do you have an example I can replicate of futures not being polled? I am not sure how this PR would improve this issue. The old schedular should basically behave the same as this one, with the exception that the old scheduler didn't have to poll all the futures that are spawned, but only those that are actually awoken. |
|
@richarddavison I will create a smaller reproduction but basically we have: import type { SDK } from "caido:plugin";
export function init(sdk: SDK) {
sdk.events.onInterceptResponse(() => {
console.log("1. Handler started");
Promise.resolve().then(() => {
console.log("2. This never executes");
});
console.log("3. Handler finished");
});
}I call the function from rust and I poll the runtime in a spawned task with the Might be a quickjs issue though |
Description of changes
Refactor async runtime primitives
Checklist