Move callback

This commit is contained in:
notgull 2022-12-30 19:17:23 -08:00
parent ae9fb34132
commit 7242f1b5df
1 changed files with 5 additions and 5 deletions

View File

@ -230,11 +230,6 @@ cfg_if::cfg_if! {
use std::ffi::c_void;
use std::os::windows::io::AsRawHandle;
// Called when a child exits.
unsafe extern "system" fn callback(_: *mut c_void, _: BOOLEAN) {
Reactor::get().pipe.event.notify_additional(1);
}
use windows_sys::Win32::{
System::{
Threading::{RegisterWaitForSingleObject, WT_EXECUTEINWAITTHREAD, WT_EXECUTEONLYONCE},
@ -243,6 +238,11 @@ cfg_if::cfg_if! {
Foundation::{BOOLEAN, HANDLE},
};
// Called when a child exits.
unsafe extern "system" fn callback(_: *mut c_void, _: BOOLEAN) {
Reactor::get().pipe.event.notify_additional(1);
}
// Register this child process to invoke `callback` on exit.
let mut wait_object = 0;
let ret = unsafe {