chore(napi): Mark shutdown_tokio_rt unsafe
This commit is contained in:
parent
5a0c1c2af3
commit
e9f43495c2
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ pub(crate) static TOKIO_RT_REF_COUNT: AtomicUsize = AtomicUsize::new(0);
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[inline(never)]
|
#[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 {
|
if TOKIO_RT_REF_COUNT.fetch_sub(1, Ordering::Relaxed) == 0 {
|
||||||
let sender = &RT.1;
|
let sender = &RT.1;
|
||||||
if let Err(e) = sender.clone().try_send(()) {
|
if let Err(e) = sender.clone().try_send(()) {
|
||||||
|
|
Loading…
Reference in a new issue