mirror of
https://github.com/napi-rs/napi-rs.git
synced 2025-12-08 19:56:07 +00:00
chore(napi): Mark shutdown_tokio_rt unsafe
This commit is contained in:
parent
5a0c1c2af3
commit
e9f43495c2
@ -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(()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user