unsafe extern "C" fn execute<T: Task>(_env: sys::napi_env, data: *mut c_void) {
  let mut work = unsafe { Box::from_raw(data as *mut AsyncWork<T>) };
  let _ = mem::replace(
    &mut work.value,
    work.inner_task.compute().map(mem::MaybeUninit::new),
  );
  Box::leak(work);
}
/// env here is the same with the one in `CallContext`.
/// So it actually could do nothing here, because `execute` function is called in the other thread mostly.
env here is the same with the one in `CallContext`.
So it actually could do nothing here, because `execute` function is called in the other thread mostly.
env here is the same with the one in ` CallContext ` . So it actually could do nothing here because ` execute ` function is called in the other thread mostly .
unsafe extern "C" fn execute<T: Task>(_env: sys::napi_env, data: *mut c_void) {
  let mut work = unsafe { Box::from_raw(data as *mut AsyncWork<T>) };
  let _ = mem::replace(
    &mut work.value,
    work.inner_task.compute().map(mem::MaybeUninit::new),
  );
  Box::leak(work);
}
unsafe extern " " fn execute < T : Task > ( _env : sys :: napi_env , data : * mut c_void ) { let mut work = unsafe { Box :: from_raw ( data as * mut AsyncWork < T > ) } ; let _ = mem :: replace ( & mut work . value , work . inner_task . compute ( ) . map ( mem :: MaybeUninit :: new ) , ) ; Box :: leak ( work ) ; }
env here is the same with the one in `CallContext`.
env here is the same with the one in ` CallContext ` .
_env
sys::napi_env
data
*mut c_void
_env
sys::napi_env
data
*mut c_void