https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-registerwaitforsingleobject?redirectedfrom=MSDN
RegisterWaitForSingleObject function (winbase.h) - Win32 apps | Microsoft Learn
Directs a wait thread in the thread pool to wait on the object.
functionwinbasehappsmicrosoft