Event Driven Programming

In command-line user-interfaces and in most batch programs there is a single input stream.

In graphical user-interfaces and process control there are typically many input channels.

To handle input from many input channels correctly there are several possibilities: