Page MenuHomePhabricator

D4870.id15782.diff
No OneTemporary

D4870.id15782.diff

diff --git a/services/backup/rust_lib/src/lib.rs b/services/backup/rust_lib/src/lib.rs
--- a/services/backup/rust_lib/src/lib.rs
+++ b/services/backup/rust_lib/src/lib.rs
@@ -82,5 +82,14 @@
}
pub fn rust_terminate_cxx() -> () {
- unimplemented!();
+ println!("[RUST] rust_terminating");
+ let handle = CLIENT.lock().expect("access client").handle.take().unwrap();
+
+ drop(CLIENT.lock().expect("access client").tx.take().unwrap());
+ RUNTIME.block_on(async {
+ handle.await.unwrap();
+ });
+
+ assert!(!rust_is_initialized_cxx(), "client handler released properly");
+ println!("[RUST] rust_terminated");
}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 1:08 AM (19 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2509646
Default Alt Text
D4870.id15782.diff (624 B)

Event Timeline