Computer engineering

A sensor can signal a microcontroller when an event occurs, but events are infrequent and their arrival time is unpredictable. Which approach can avoid repeatedly checking the sensor in a tight loop?