What different ways are available to achive an action, when a specific event has occured besides a callback or making a loop that does nothing but wait for a condition to become true?
I have read up a bit on signals in unix, would it be possibel to make a function pause until it recieves a signal from another function?
I have used the "waiting in a loop" for now but it wastes a lot of cpu resources.