summaryrefslogtreecommitdiff
path: root/cli/repl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/repl.rs')
-rw-r--r--cli/repl.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/cli/repl.rs b/cli/repl.rs
index c5107d5af..fbc37fac5 100644
--- a/cli/repl.rs
+++ b/cli/repl.rs
@@ -47,7 +47,7 @@ async fn post_message_and_poll(
return result
}
- _ = worker.run_event_loop() => {
+ _ = &mut *worker => {
// A zero delay is long enough to yield the thread in order to prevent the loop from
// running hot for messages that are taking longer to resolve like for example an
// evaluation of top level await.
@@ -75,7 +75,7 @@ async fn read_line_and_poll(
result = &mut line => {
return result.unwrap();
}
- _ = worker.run_event_loop(), if poll_worker => {
+ _ = &mut *worker, if poll_worker => {
poll_worker = false;
}
_ = &mut timeout => {
@@ -92,7 +92,12 @@ pub async fn run(
// Our inspector is unable to default to the default context id so we have to specify it here.
let context_id: u32 = 1;
- let mut session = worker.create_inspector_session();
+ let inspector = worker
+ .inspector
+ .as_mut()
+ .expect("Inspector is not created.");
+
+ let mut session = InspectorSession::new(&mut **inspector);
let history_file = global_state.dir.root.join("deno_history.txt");