Linux/POSIX equivalent for Win32's CreateEvent, SetEvent, WaitForSingleObject

后端 未结 4 2064
感情败类
感情败类 2020-12-03 20:09

I have written a small class for synchronizing threads of both Linux (actually Android) and Windows.

Here is the Win32 implementation of my interface :



        
4条回答
  •  醉梦人生
    2020-12-03 20:24

    Our open-source pevents library is an implementation of just that for all platforms. It's a very small (single-file) bit of C++ code that you can just add to your existing project and get access to the Windows event api built on top of pthreads synchronization primitives.

    The most important tidbit is that it includes WaitForMultipleObjects support.

    https://github.com/neosmart/pevents

提交回复
热议问题