Event-driven programming

Source: Wikipedia, the free encyclopedia.

In

threads, or network
events.

Event-driven programming is the dominant paradigm used in graphical user interfaces applications and network servers.

In an event-driven application, there is generally an event loop that listens for events and then triggers a callback function when one of those events is detected.

Event-driven programs can be written in any programming language, although the task is easier in languages that provide high-level abstractions.

Although they do not exactly fit the event-driven model, interrupt handling and exception handling have many similarities.

Event loop