Is there a C ++ equivalent for WaitforSingleObject?

I need to rewrite code that uses the Windows WaitforSingleObject function.

myEvent = CreateEvent( NULL, FALSE, FALSE, szName );
WaitForSingleObject( myEvent, nMilliseconds );

I need to wait for an event or a timeout. Is there an equivalent to this in direct C ++ ??

I am using STL C ++ 11 and not other libraries like boost.

+4
source share
1 answer

You cannot use C ++ 11 stream routines with win32 streams (unless you can handle the implementation of mingw streams very much, which I would not recommend), and there is no standard C ++ equivalent for calling APIs for a particular OS.

++ 11 (cfr. waiting), , WaitForSingleObject, ..

  • ,
  • , -

: wait_until

+4

All Articles