Thread base interface, must be implemented for all OS. More...
#include <thread.h>
Public Member Functions | |
| virtual | ~IThread () |
| virtual void | start ()=0 |
| virtual bool | isRunning ()=0 |
| virtual void | terminate ()=0 |
| virtual void | wait ()=0 |
| virtual IRunnable * | getRunnable ()=0 |
| Return a pointer to the runnable object. | |
| virtual bool | setCPUMask (uint64 cpuMask)=0 |
| Set the CPU mask of this thread. | |
| virtual uint64 | getCPUMask ()=0 |
| Get the CPU mask of this thread. | |
| virtual std::string | getUserName ()=0 |
| Get the thread user name. | |
Static Public Member Functions | |
| static IThread * | create (IRunnable *runnable, uint32 stackSize=0) |
| Create a new thread. | |
| static IThread * | getCurrentThread () |
| Return a pointer on the current thread. | |
Thread base interface, must be implemented for all OS.
Definition at line 84 of file thread.h.
Create a new thread.
Implemented in the derived class.
Definition at line 38 of file p_thread.cpp.
Referenced by NLMISC::CTaskManager::CTaskManager(), NLNET::CStdinMonitorSingleton::init(), NL3D::CZoneLighter::light(), NL3D::CZoneLighter::lightShapes(), and NLMISC::CCoTask::start().
| virtual uint64 NLMISC::IThread::getCPUMask | ( | ) | [pure virtual] |
Get the CPU mask of this thread.
Thread must have been started before. The mask should be a subset of the CPU mask returned by IProcess::getCPUMask() thread process. Not implemented under Linux.
Referenced by NL3D::CZoneLighter::light().
| IThread * NLMISC::IThread::getCurrentThread | ( | ) | [static] |
Return a pointer on the current thread.
Implemented in the derived class. Not implemented under Linux.
Definition at line 49 of file p_thread.cpp.
References NLMISC::CurrentThread().
Referenced by NL3D::CZoneLighter::light().
| virtual IRunnable* NLMISC::IThread::getRunnable | ( | ) | [pure virtual] |
Return a pointer to the runnable object.
Referenced by NLNET::CBufServer::~CBufServer().
| virtual std::string NLMISC::IThread::getUserName | ( | ) | [pure virtual] |
Get the thread user name.
Notimplemented under linux, under windows return the name of the logon user.
| virtual bool NLMISC::IThread::isRunning | ( | ) | [pure virtual] |
Set the CPU mask of this thread.
Thread must have been started before. The mask must be a subset of the CPU mask returned by IProcess::getCPUMask() thread process. Not implemented under Linux.
Referenced by NL3D::CZoneLighter::light(), and setCPUMask().
| virtual void NLMISC::IThread::start | ( | ) | [pure virtual] |
Referenced by NLNET::CBufServer::addNewThread(), NLNET::CBufClient::connect(), NLMISC::CWindowDisplayer::create(), NLMISC::CTaskManager::CTaskManager(), NLNET::CUnifiedNetwork::init(), NLNET::CStdinMonitorSingleton::init(), NLNET::CBufServer::init(), NL3D::CZoneLighter::light(), NLNET::IService::main(), and NLMISC::CCoTask::start().
| virtual void NLMISC::IThread::terminate | ( | ) | [pure virtual] |
Referenced by NLNET::CStdinMonitorSingleton::release().
| virtual void NLMISC::IThread::wait | ( | ) | [pure virtual] |
Referenced by NLNET::IService::main(), NLNET::CUnifiedNetwork::release(), NLNET::CStdinMonitorSingleton::release(), NLNET::CBufClient::~CBufClient(), NLNET::CBufServer::~CBufServer(), NLMISC::CTaskManager::~CTaskManager(), NLMISC::CWindowDisplayer::~CWindowDisplayer(), and NLMISC::TCoTaskData::~TCoTaskData().
1.6.1