From d6de5408b71f23032c57fbb7f122d3295605dd33 Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Sat, 14 Aug 2021 08:42:06 +0300 Subject: dispatch events in client --- helix-dap/examples/dap-basic.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'helix-dap/examples/dap-basic.rs') diff --git a/helix-dap/examples/dap-basic.rs b/helix-dap/examples/dap-basic.rs index 82e14702..76fc0dd3 100644 --- a/helix-dap/examples/dap-basic.rs +++ b/helix-dap/examples/dap-basic.rs @@ -56,8 +56,12 @@ pub async fn main() -> Result<()> { .read_line(&mut _in) .expect("Failed to read line"); + let mut stopped_event = client.listen_for_event("stopped".to_owned()).await; + println!("configurationDone: {:?}", client.configuration_done().await); - println!("stopped: {:?}", client.wait_for_stopped().await); + + println!("stopped: {:?}", stopped_event.recv().await); + println!("threads: {:#?}", client.threads().await); let bt = client.stack_trace(1).await.expect("expected stack trace"); println!("stack trace: {:#?}", bt); -- cgit v1.2.3-70-g09d2