https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitforsingleobjectex?redirectedfrom=MSDN
WaitForSingleObjectEx function (synchapi.h) - Win32 apps | Microsoft Learn
Waits until the specified object is in the signaled state, an I/O completion routine or asynchronous procedure call (APC) is queued to the thread, or the...
functionhappsmicrosoftlearn