extern "C" fn handle_in_thread_callback<F>(cb: *mut c_void)where F: FnOnce() -> Result<()> + 'static,