aboutsummaryrefslogtreecommitdiff
path: root/helix-dap
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-12-05 05:52:56 +0000
committerBlaž Hrastnik2021-12-06 00:35:59 +0000
commitdc8df7ba219d9a403ee77027dd5a698f08a1dcce (patch)
tree57802ebae4f4068fe5e3917542ec21f1e8f51d94 /helix-dap
parent2b4de41bf0e0fc7d276e99f6359c9062df65473d (diff)
Make thread_picker non-blocking
Diffstat (limited to 'helix-dap')
-rw-r--r--helix-dap/src/client.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs
index 9598e24e..651bf4d6 100644
--- a/helix-dap/src/client.rs
+++ b/helix-dap/src/client.rs
@@ -209,7 +209,7 @@ impl Client {
}
/// Execute a RPC request on the debugger.
- fn call<R: crate::types::Request>(
+ pub fn call<R: crate::types::Request>(
&self,
arguments: R::Arguments,
) -> impl Future<Output = Result<Value>>
@@ -248,7 +248,7 @@ impl Client {
}
}
- async fn request<R: crate::types::Request>(&self, params: R::Arguments) -> Result<R::Result>
+ pub async fn request<R: crate::types::Request>(&self, params: R::Arguments) -> Result<R::Result>
where
R::Arguments: serde::Serialize,
R::Result: core::fmt::Debug, // TODO: temporary
@@ -384,9 +384,8 @@ impl Client {
Ok((response.stack_frames, response.total_frames))
}
- pub async fn threads(&self) -> Result<Vec<Thread>> {
- let response = self.request::<requests::Threads>(()).await?;
- Ok(response.threads)
+ pub fn threads(&self) -> impl Future<Output = Result<Value>> {
+ self.call::<requests::Threads>(())
}
pub async fn scopes(&self, frame_id: usize) -> Result<Vec<Scope>> {