AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
AMessageQueue< Mutex, Args > Class Template Reference

Universal thread-safe message (callback) queue implementation. More...

Detailed Description

template<typename Mutex = AMutex, typename... Args>
class AMessageQueue< Mutex, Args >

Universal thread-safe message (callback) queue implementation.

Thread-safe message queue. The implementation supports enqueueing new messages inside the callbacks.

Public Types

using Message = std::function< void(Args...)>
 

Public Member Functions

void enqueue (Message message)
 Add message to the queue to process in processMessages().
 
void processMessages (Args... args)
 Process messages submitted by enqueue method.
 
Mutex & sync () noexcept
 
ADeque< Message > & messages () noexcept
 
const Mutex & sync () const noexcept
 
const ADeque< Message > & messages () const noexcept
 

#include <AUI/Util/AMessageQueue.h>


The documentation for this class was generated from the following file: