Add in-process app server and wire up exec to use it (#14005)

This is a subset of PR #13636. See that PR for a full overview of the
architectural change.

This PR implements the in-process app server and modifies the
non-interactive "exec" entry point to use the app server.

---------

Co-authored-by: Felipe Coury <felipe.coury@gmail.com>
This commit is contained in:
Eric Traut
2026-03-08 18:43:55 -06:00
committed by GitHub
parent a684a36091
commit da3689f0ef
13 changed files with 3019 additions and 431 deletions

View File

@@ -273,6 +273,25 @@ impl OutgoingMessageSender {
self.take_request_callback(id).await.is_some()
}
pub(crate) async fn cancel_all_requests(&self, error: Option<JSONRPCErrorError>) {
let entries = {
let mut request_id_to_callback = self.request_id_to_callback.lock().await;
request_id_to_callback
.drain()
.map(|(_, entry)| entry)
.collect::<Vec<_>>()
};
if let Some(error) = error {
for entry in entries {
if let Err(err) = entry.callback.send(Err(error.clone())) {
let request_id = entry.request.id();
warn!("could not notify callback for {request_id:?} due to: {err:?}");
}
}
}
}
async fn take_request_callback(
&self,
id: &RequestId,