pub fn new(name: String, core: u32) -> Option<Self> {
        let name = CString::new(name).unwrap();

        if let Some(t) = NonNull::new(unsafe {
            let mut mask = CpuMask::new();
            mask.set_cpu(core, true);
            spdk_thread_create(name.as_ptr(), mask.as_ptr())
        }) {
            Some(Mthread(t))
        } else {
            None
        }
    }
///
/// With the given thread as context, execute the closure on that thread.
///
/// Any function can be executed here however, this should typically be used
/// to execute functions that reference any FFI to SPDK.
With the given thread as context, execute the closure on that thread.
Any function can be executed here however, this should typically be used
to execute functions that reference any FFI to SPDK.
With the given thread as context execute the closure on that thread . Any function can be executed here however this should typically be used to execute functions that reference any FFI to SPDK .
pub fn new(name: String, core: u32) -> Option<Self> {
        let name = CString::new(name).unwrap();
        if let Some(t) = NonNull::new(unsafe {
            let mut mask = CpuMask::new();
            mask.set_cpu(core, true);
            spdk_thread_create(name.as_ptr(), mask.as_ptr())
        }) {
            Some(Mthread(t))
        } else {
            None
        }
    }
pub fn new ( name : String , core : u32 ) -> Option < Self > { let name = CString :: new ( name ) . unwrap ( ) ; if let Some ( t ) = NonNull :: new ( unsafe { let mut mask = CpuMask :: new ( ) ; mask . set_cpu ( core , true ) ; spdk_thread_create ( name . as_ptr ( ) , mask . as_ptr ( ) ) } ) { Some ( Mthread ( t ) ) } else { None } }
With the given thread as context, execute the closure on that thread.
With the given thread as context execute the closure on that thread .
name
String
core
u32