diff --git a/crates/napi/src/tokio_runtime.rs b/crates/napi/src/tokio_runtime.rs index 6777b43e..9fbac24b 100644 --- a/crates/napi/src/tokio_runtime.rs +++ b/crates/napi/src/tokio_runtime.rs @@ -35,7 +35,7 @@ pub(crate) static TOKIO_RT_REF_COUNT: AtomicUsize = AtomicUsize::new(0); #[doc(hidden)] #[inline(never)] -pub extern "C" fn shutdown_tokio_rt(arg: *mut c_void) { +pub unsafe extern "C" fn shutdown_tokio_rt(arg: *mut c_void) { if TOKIO_RT_REF_COUNT.fetch_sub(1, Ordering::Relaxed) == 0 { let sender = &RT.1; if let Err(e) = sender.clone().try_send(()) {