|
Event-Driven Programming in C++ 1.0
A case study on event-driven programming in C++
|
Contains the implementation of a thread-safe event queue. More...
Classes | |
| class | EventQueue |
| A thread-safe event queue. More... | |
Contains the implementation of a thread-safe event queue.
This namespace provides functionality for managing asynchronous events using a FIFO queue. The primary component is the EventQueue class, which allows events, represented as callable objects, to be enqueued and processed in a thread-safe manner. It leverages standard C++ libraries such as std::queue, std::function, and std::mutex to ensure safe access across multiple threads.
The event queue is particularly useful for decoupling event production from event processing, making it a valuable tool in event-driven architectures, game loops, and other asynchronous applications.