|
Event-Driven Programming in C++ 1.0
A case study on event-driven programming in C++
|
Entry point for the Event Queue demonstration. More...
Functions | |
| int | main () |
Entry point for the Event Queue demonstration.
This example demonstrates how to use the EventQueue class to decouple event production from event consumption in a thread-safe manner. Several events are enqueued as lambda functions that print messages to the console. After enqueuing the events, the program processes them in FIFO order.
In real-world applications, events may be enqueued from multiple threads and processed by a dedicated event loop. For simplicity, this demonstration enqueues and processes events in the main thread.
| int main | ( | ) |