pub unsafe trait RcuDefer {
// Required method
fn configure<F>(self: Box<Self>, func: F)
where F: FnOnce(NonNull<c_void>, unsafe extern "C" fn(head: *mut c_void));
}Expand description
This trait defines a callback to be invoked after the next RCU grace period.
§Implementation
Each RCU thread have an array of (callback, data) pointers. When the next RCU
grace period finishes, the thread goes over each of its entry and execute
callback(data).
§Safety
When RcuDefer::configure is called, you must deliberately leak your type
(e.g. Box::into_raw) to prevent the memory from being freed. Upon execution
of the callback, you must get back ownership (e.g. Box::from_raw) and properly
free up memory. For an example, see RcuDeferFn.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.