c++ - Synchronizing threads and signalling -


i trying tell 1 thread it's ok continue calculations after other thread reads data named pipe. currently, have while infinite loop checks everytime new data. inefficient consumes 100% of cpu...

my question is... there way wait until 1 thread has checked new data , tell other thread it's ok continue (something signal)?

there various solutions problem:

  • signals , slots model of qt
  • c++: boost.signals2 or boost.signals (deprecated)
  • c++: libsigc++ - template-based
  • c++: sigslot
  • c++: xlobject - template-based, qt-oriented.
  • c++: signals
  • c: libevent - multi-threaded, platformindependent
  • c: libev - minimal alternative libevent.

have @ them , find 1 fits best you.