summaryrefslogtreecommitdiff
path: root/runtime/worker.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-11-27 00:09:04 +0100
committerGitHub <noreply@github.com>2023-11-26 23:09:04 +0000
commit550a24ad0e3c3e7a2e344079fe4e16b3ab7c170b (patch)
tree6ed5470f8084bff45e9a4d71a2742670faa6fa25 /runtime/worker.rs
parenta4ec7dfae01485290af91c62c1ce17a742dcb104 (diff)
refactor: use new poll methods from JsRuntime (#21302)
Diffstat (limited to 'runtime/worker.rs')
-rw-r--r--runtime/worker.rs16
1 files changed, 14 insertions, 2 deletions
diff --git a/runtime/worker.rs b/runtime/worker.rs
index c60e189f7..667644dc8 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -603,14 +603,26 @@ impl MainWorker {
cx: &mut Context,
wait_for_inspector: bool,
) -> Poll<Result<(), AnyError>> {
- self.js_runtime.poll_event_loop(cx, wait_for_inspector)
+ self.js_runtime.poll_event_loop2(
+ cx,
+ deno_core::PollEventLoopOptions {
+ wait_for_inspector,
+ ..Default::default()
+ },
+ )
}
pub async fn run_event_loop(
&mut self,
wait_for_inspector: bool,
) -> Result<(), AnyError> {
- self.js_runtime.run_event_loop(wait_for_inspector).await
+ self
+ .js_runtime
+ .run_event_loop2(deno_core::PollEventLoopOptions {
+ wait_for_inspector,
+ ..Default::default()
+ })
+ .await
}
/// Return exit code set by the executed code (either in main worker