I have an application that needs to respond to certain events in the following manner:
void someMethodWithinSomeClass() {
while (true) {
wait for
C++11 and Boost have condition variables. They are a means for a thread to unblock another one that is waiting for some event to occur. The link above brings you to the documentation for std::condition_variable, and has a code sample that shows how to use it.
If you need to keep track of events (say, keystrokes) and need to process them in a FIFO (first-in first-out) manner, then you'll have to use or make some kind of multi-threaded event queuing system, as suggested in some of the other answers. Condition variables can be used as building blocks to write your own producer/consumer queue, if you choose not to use an existing implementation.