Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3265316
D4870.id15782.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
624 B
Referenced Files
None
Subscribers
None
D4870.id15782.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D4870: [services] Backup - Rust lib - Add terminate
Attached
Detach File
Event Timeline
Log In to Comment