MCPcopy Create free account
hub / github.com/corosync/corosync / finalize

Function finalize

bindings/rust/src/cmap.rs:135–143  ·  view source on GitHub ↗

Finish with a connection to corosync. Takes a [Handle] as returned from [initialize]

(handle: &Handle)

Source from the content-addressed store, hash-verified

133/// Finish with a connection to corosync.
134/// Takes a [Handle] as returned from [initialize]
135pub fn finalize(handle: &Handle) -> Result<()> {
136 let res = unsafe { ffi::cmap_finalize(handle.cmap_handle) };
137 if res == ffi::CS_OK {
138 HANDLE_HASH.lock().unwrap().remove(&handle.cmap_handle);
139 Ok(())
140 } else {
141 Err(CsError::from_c(res))
142 }
143}
144
145/// Return a file descriptor to use for poll/select on the CMAP handle.
146/// Takes a [Handle] as returned from [initialize],

Callers 1

dropMethod · 0.70

Calls 1

cmap_finalizeFunction · 0.85

Tested by

no test coverage detected