11#if !defined(OWL_MSGTHRED_H)
15#if defined(BI_HAS_PRAGMA_ONCE)
19#if defined(BI_MULTI_THREAD)
40#if defined(BI_MULTI_THREAD_RTL)
41class _OWLCLASS TMsgThread :
public TThread
55 virtual int MessageLoop();
57 virtual bool ProcessMsg(
MSG&
msg);
59 bool PumpWaitingMessages();
64 bool IsRunning()
const;
69#if defined(BI_MULTI_THREAD_RTL)
70# if defined(BI_USE_CRITICAL_SECTION)
86#if defined(BI_COMP_BORLAND)
87 TMsgThread::TMsgMutex::TLock *Lock;
89 TMsgMutex::TLock *Lock;
95#if defined(BI_MULTI_THREAD_RTL)
103 virtual void InitInstance();
104 virtual int TermInstance(
int status);
112#if defined(BI_MULTI_THREAD_RTL)
139inline bool TMsgThread::IsRunning()
const
144#if defined(BI_MULTI_THREAD_RTL)
151inline void TMsgThread::EnableMultiThreading(
bool enable)
160inline TMsgThread::TMsgMutex* TMsgThread::GetMutex()
168inline TMsgThread::TAppMutex::TAppMutex()
172 Mutex =
new TMsgThread::TMsgMutex;
176inline TMsgThread::TAppMutex::~TAppMutex()
185inline TMsgThread::TMsgMutex* TMsgThread::TAppMutex::GetMutex()
193inline TMsgThread::TQueueLock::TQueueLock(TMsgThread&
app)
198 Lock =
new TMsgMutex::TLock(*
appMutex);
204inline TMsgThread::TQueueLock::~TQueueLock()
212inline void TMsgThread::TQueueLock::Release(
bool relinquish)
Lightweight intra-process thread synchronization.
TMsgThread implements basic behavior for threads that own message queues, including mutex locking for...
bool BreakMessageLoop
Message loop is broken via WM_QUIT.
bool LoopRunning
Track if the loop is running.
int MessageLoopResult
Return value from message loop.
Mutual-exclusive semaphore.
Object Windows Library (OWLNext Core)
void InUse(const T &arg)
Handy utility to avoid compiler warnings about unused parameters.
Definition of TSystem, a system information provider class.
Includes windowing system headers, with necessary macros defined.