#include <CArchMultithreadWindows.h>
Inherits IArchMultithread.
Inheritance diagram for CArchMultithreadWindows:
accessors | |
HANDLE | getCancelEventForCurrentThread () |
void * | getNetworkDataForThread (CArchThread) |
CArchMultithreadWindows * | getInstance () |
Public Member Functions | |
virtual CArchCond | newCondVar () |
Create a condition variable. | |
virtual void | closeCondVar (CArchCond) |
Destroy a condition variable. | |
virtual void | signalCondVar (CArchCond) |
Signal a condition variable. | |
virtual void | broadcastCondVar (CArchCond) |
Broadcast a condition variable. | |
virtual bool | waitCondVar (CArchCond, CArchMutex, double timeout) |
Wait on a condition variable. | |
virtual CArchMutex | newMutex () |
Create a recursive mutex. | |
virtual void | closeMutex (CArchMutex) |
Destroy a mutex. | |
virtual void | lockMutex (CArchMutex) |
Lock a mutex. | |
virtual void | unlockMutex (CArchMutex) |
Unlock a mutex. | |
virtual CArchThread | newThread (ThreadFunc, void *) |
Start a new thread. | |
virtual CArchThread | newCurrentThread () |
Get a reference to the calling thread. | |
virtual CArchThread | copyThread (CArchThread) |
Copy a thread object. | |
virtual void | closeThread (CArchThread) |
Release a thread reference. | |
virtual void | cancelThread (CArchThread) |
Force a thread to exit. | |
virtual void | setPriorityOfThread (CArchThread, int n) |
Change thread priority. | |
virtual void | testCancelThread () |
Cancellation point. | |
virtual bool | wait (CArchThread, double timeout) |
Wait for a thread to exit. | |
virtual bool | isSameThread (CArchThread, CArchThread) |
Compare threads. | |
virtual bool | isExitedThread (CArchThread) |
Test if thread exited. | |
virtual void * | getResultOfThread (CArchThread) |
Returns the exit code of a thread. | |
virtual ThreadID | getIDOfThread (CArchThread) |
Returns an ID for a thread. | |
virtual void | setSignalHandler (ESignal, SignalFunc, void *) |
Set the interrupt handler. | |
virtual void | raiseSignal (ESignal) |
Invoke the signal handler. | |
manipulators | |
void | setNetworkDataForCurrentThread (void *) |
Definition at line 41 of file CArchMultithreadWindows.h.
|
Broadcast a condition variable. Broadcasting a condition variable releases all waiting threads. Implements IArchMultithread. Definition at line 189 of file CArchMultithreadWindows.cpp. References lockMutex(), CArchCondImpl::m_events, CArchCondImpl::m_waitCount, CArchCondImpl::m_waitCountMutex, and unlockMutex(). |
|
Force a thread to exit.
Causes Implements IArchMultithread. Definition at line 366 of file CArchMultithreadWindows.cpp. References CArchThreadImpl::m_cancel. |
|
Release a thread reference. Deletes the given thread object. This does not destroy the thread the object referred to, even if there are no remaining references. Use cancelThread() and waitThread() to stop a thread and wait for it to exit. Implements IArchMultithread. Definition at line 336 of file CArchMultithreadWindows.cpp. References lockMutex(), CArchThreadImpl::m_id, CArchThreadImpl::m_refCount, CArchThreadImpl::m_thread, and unlockMutex(). Referenced by CArchNetworkWinsock::pollSocket(), and wait(). |
|
Copy a thread object.
Returns a reference to to thread referred to by Implements IArchMultithread. Definition at line 359 of file CArchMultithreadWindows.cpp. |
|
Returns an ID for a thread.
Returns some ID number for Implements IArchMultithread. Definition at line 530 of file CArchMultithreadWindows.cpp. References CArchThreadImpl::m_id. |
|
Returns the exit code of a thread.
Waits indefinitely for (Cancellation point) Implements IArchMultithread. Definition at line 521 of file CArchMultithreadWindows.cpp. References lockMutex(), CArchThreadImpl::m_result, and unlockMutex(). |
|
Test if thread exited.
Returns true iff Implements IArchMultithread. Definition at line 514 of file CArchMultithreadWindows.cpp. References CArchThreadImpl::m_exit. |
|
Compare threads. Returns true iff two thread objects refer to the same thread. Note that comparing thread objects directly is meaningless. Implements IArchMultithread. Definition at line 508 of file CArchMultithreadWindows.cpp. |
|
Create a condition variable. The condition variable is an opaque data type. Implements IArchMultithread. Definition at line 153 of file CArchMultithreadWindows.cpp. References CArchCondImpl::m_events, CArchCondImpl::m_waitCount, CArchCondImpl::m_waitCountMutex, and newMutex(). |
|
Get a reference to the calling thread. Returns a thread representing the current (i.e. calling) thread. Implements IArchMultithread. Definition at line 326 of file CArchMultithreadWindows.cpp. References lockMutex(), and unlockMutex(). Referenced by CArchNetworkWinsock::pollSocket(). |
|
Create a recursive mutex. Creates a recursive mutex. A thread may lock a recursive mutex when it already holds a lock on that mutex. The mutex is an opaque data type. Implements IArchMultithread. Definition at line 263 of file CArchMultithreadWindows.cpp. References CArchMutexImpl::m_mutex. Referenced by newCondVar(). |
|
Start a new thread.
Creates and starts a new thread, using Implements IArchMultithread. Definition at line 290 of file CArchMultithreadWindows.cpp. References lockMutex(), CArchThreadImpl::m_func, CArchThreadImpl::m_id, CArchThreadImpl::m_thread, CArchThreadImpl::m_userData, and unlockMutex(). |
|
Invoke the signal handler.
Invokes the signal handler for Implements IArchMultithread. Definition at line 546 of file CArchMultithreadWindows.cpp. References lockMutex(), and unlockMutex(). |
|
Change thread priority.
Changes the priority of Implements IArchMultithread. Definition at line 375 of file CArchMultithreadWindows.cpp. References CArchThreadImpl::m_thread. |
|
Set the interrupt handler.
Sets the function to call on receipt of an external interrupt. By default and when Implements IArchMultithread. Definition at line 536 of file CArchMultithreadWindows.cpp. References lockMutex(), and unlockMutex(). |
|
Signal a condition variable. Signalling a condition variable releases one waiting thread. Implements IArchMultithread. Definition at line 175 of file CArchMultithreadWindows.cpp. References lockMutex(), CArchCondImpl::m_events, CArchCondImpl::m_waitCount, CArchCondImpl::m_waitCountMutex, and unlockMutex(). |
|
Cancellation point. This method does nothing but is a cancellation point. Clients can make their own functions cancellation points by calling this method at appropriate times. (Cancellation point) Implements IArchMultithread. Definition at line 434 of file CArchMultithreadWindows.cpp. References lockMutex(), and unlockMutex(). Referenced by CArchNetworkWinsock::pollSocket(), and CArchSleepWindows::sleep(). |
|
Wait for a thread to exit.
Waits for up to (Cancellation point) Implements IArchMultithread. Definition at line 446 of file CArchMultithreadWindows.cpp. References closeThread(), lockMutex(), CArchThreadImpl::m_cancel, CArchThreadImpl::m_exit, and unlockMutex(). |
|
Wait on a condition variable.
Wait on a conditation variable for up to (Cancellation point) Implements IArchMultithread. Definition at line 203 of file CArchMultithreadWindows.cpp. References lockMutex(), CArchCondImpl::m_events, CArchCondImpl::m_waitCount, CArchCondImpl::m_waitCountMutex, and unlockMutex(). |