DCL 4.0
|
#include <PollThread.h>
Classes | |
struct | Update |
Protected Types | |
typedef List< Update > | UpdateList |
Protected Member Functions | |
virtual int | run () |
virtual void | onRemoved (PollAble *_pPollAble) |
Protected Member Functions inherited from Thread | |
virtual bool | init () |
Protected Member Functions inherited from Object | |
virtual | ~Object () |
Object () |
Protected Attributes | |
UpdateList | __updateList |
Thread::Mutex | __updateLock |
Thread::Event | __pollInterrupt |
volatile bool | __terminate |
Additional Inherited Members | |
Public Types inherited from Thread | |
typedef void(* | initRoutine) () |
typedef SingleLock< Mutex > | SingleLockMutex |
typedef SingleLock< SpinLock > | SingleLockSpin |
typedef SingleTryLock< Mutex > | SingleTryLockMutex |
typedef SingleTryLock< SpinLock > | SingleTryLockSpin |
Public Member Functions inherited from Object | |
virtual String | toString () const |
virtual void | destroy () |
String | className () const |
bool | isInstanceOf (const std::type_info &typeinfo) const |
virtual const std::type_info & | typeInfo () const |
Static Public Member Functions inherited from Thread | |
static void | sleep (unsigned int _mills) |
static void | yield () |
static unsigned long | getCurrentThreadId () |
static Thread * | getCurrentThread () |
static void | crtLock (const void *_p) |
static void | crtUnlock (const void *_p) |
static long | incrementAndGet (volatile long &_n) |
static long long | incrementAndGet (volatile long long &_n) |
static long | decrementAndGet (volatile long &_n) |
static long long | decrementAndGet (volatile long long &_n) |
Non-Blocking 입출력 장치에대한 비동기 감시기능을 제공한다.
UNIX에서는 poll을 사용하여 구현되어 있으며, 모든 입출력 fd에 대하여 사용하능하다.
Windows에서는 WSAPoll를 사용한다. 이 때문에, Windows은 Windows Vista, Windows 2008 이상의 버전(_WIN32_WINNT >= 0x0600) 의 WinSock2의 SOCKET을 감시에서만 사용할 수 있다. Windows에서 다른 입출력에 대한 감시는 관련 클래스를 참고한다.
Definition at line 34 of file PollThread.h.
|
protected |
Definition at line 95 of file PollThread.h.
|
protectedvirtual |
입출력 감시대상에서 제거된 후 해당 객체를 처분한다.
기본구현은 _pPollAble의 destroy()를 호출하여 파괴한다
Definition at line 221 of file PollThread.cpp.
|
protectedvirtual |
스레드의 주 실행 루프를 구현한다.
잊지말자!! 다음의 코드를 ~PollThread() 에 포함시키면 파생클래스 영역은 이미 파괴된 후 이기 때문에 파생클래스의 onRemoved는 호출되지 않는다.
Implements Thread.
Definition at line 97 of file PollThread.cpp.
|
protected |
Definition at line 103 of file PollThread.h.
|
protected |
Definition at line 105 of file PollThread.h.
|
protected |
Definition at line 96 of file PollThread.h.
|
protected |
Definition at line 97 of file PollThread.h.