aKode fase 5: rinomina interna (crate akode-*, akode-rs/, akode-cli/, binario akode, AKODE_*, ~/.akode, snapshot)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-11 11:06:46 +01:00
parent df99318392
commit 86e7c72e5f
10383 changed files with 749164 additions and 749170 deletions

View File

@@ -0,0 +1,23 @@
//! Removes client RPC registrations when their call completes or is canceled.
//! The pending map is locked only for synchronous bookkeeping, including in Drop.
use std::collections::HashMap;
use std::sync::Mutex;
use akode_exec_server_protocol::RequestId;
use super::PendingRequest;
pub(super) struct PendingRequestGuard<'a> {
pub(super) pending: &'a Mutex<HashMap<RequestId, PendingRequest>>,
pub(super) request_id: RequestId,
}
impl Drop for PendingRequestGuard<'_> {
fn drop(&mut self) {
self.pending
.lock()
.unwrap_or_else(std::sync::PoisonError::into_inner)
.remove(&self.request_id);
}
}