![]() |
XII Release 0.1.0
|
#include <MessageLoop.h>
Public Member Functions | |
| void | AddChannel (xiiIpcChannel *pChannel) |
| Needs to be called by newly created channels' constructors. | |
| void | RemoveChannel (xiiIpcChannel *pChannel) |
Protected Member Functions | |
| XII_MAKE_SUBSYSTEM_STARTUP_FRIEND (Foundation, MessageLoop) | |
| void | StartUpdateThread () |
| void | StopUpdateThread () |
| void | RunLoop () |
| bool | ProcessTasks () |
| void | Quit () |
| virtual void | WakeUp ()=0 |
| Wake up the message loop when new work comes in. | |
| virtual bool | WaitForMessages (xiiInt32 iTimeout, xiiIpcChannel *pFilter)=0 |
Protected Attributes | |
| xiiThreadID | m_ThreadId = 0 |
| xiiMutex | m_Mutex |
| bool | m_bShouldQuit = false |
| bool | m_bCallTickFunction = false |
| class xiiLoopThread * | m_pUpdateThread = nullptr |
| xiiMutex | m_TasksMutex |
| xiiDynamicArray< xiiIpcChannel * > | m_ConnectQueue |
| xiiDynamicArray< xiiIpcChannel * > | m_DisconnectQueue |
| xiiDynamicArray< xiiIpcChannel * > | m_SendQueue |
| xiiDynamicArray< xiiIpcChannel * > | m_ConnectQueueTask |
| xiiDynamicArray< xiiIpcChannel * > | m_DisconnectQueueTask |
| xiiDynamicArray< xiiIpcChannel * > | m_SendQueueTask |
| xiiDynamicArray< xiiIpcChannel * > | m_AllAddedChannels |
Friends | |
| class | xiiLoopThread |
| class | xiiIpcChannel |
Internal sub-system used by xiiIpcChannel.
This sub-system creates a background thread as soon as the first xiiIpcChannel is added to it. This class should never be needed to be accessed outside of xiiIpcChannel implementations.
|
protectedpure virtual |
Waits until a new message has been processed (sent, received).
| timeout | If negative, wait indefinitely. |
| pFilter | If not null, wait for a message for the specific channel. |
Implemented in xiiMessageLoop_NoImpl.
|
protectedpure virtual |
Wake up the message loop when new work comes in.
Implemented in xiiMessageLoop_NoImpl.