title: What is the proper way of doing event handling in C++?
body: <p>I have an application that needs to respond to certain events in the following manner:</p>
  
  <pre><code>void someMethodWithinSomeClass() {
      while (true) {
          wait for event;
          if (event == SomeEvent) {
              doSomething();
              continue;
          }
          if (event == SomeOtherEvent) {
              doSomethingElse();
              continue;
          }
      } 
  }
  </code></pre>
  
  <p>This would be running is some thread. In some other threads, operations would create and fire the Events. </p>
  
  <p>How do I get these Events to reach the above method/class? What is the proper strategy or architecture for implementing event handling in C++? </p>