mirror of
https://github.com/denoland/deno.git
synced 2025-10-01 14:41:15 +00:00
refactor(core): JsRuntime is not a Future (#7855)
This commit rewrites deno_core::JsRuntime to not implement Future trait. Instead there are two separate methods: - JsRuntime::poll_event_loop() - does single tick of event loop - JsRuntime::run_event_loop() - runs event loop to completion
This commit is contained in:
parent
8bd7c936f9
commit
d8879feb8c
6 changed files with 73 additions and 66 deletions
|
@ -240,7 +240,7 @@ impl Future for Worker {
|
|||
// We always poll the inspector if it exists.
|
||||
let _ = inner.inspector.as_mut().map(|i| i.poll_unpin(cx));
|
||||
inner.waker.register(cx.waker());
|
||||
inner.js_runtime.poll_unpin(cx)
|
||||
inner.js_runtime.poll_event_loop(cx)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue