IBR-DTNSuite
0.8
|
#include <Thread.h>
Public Member Functions | |
virtual | ~DetachedThread ()=0 |
void | start (int priority=0) throw (ThreadException) |
void | stop () throw (ThreadException) |
Protected Member Functions | |
DetachedThread (size_t size=DEFAULT_STACKSIZE) |
A detached thread object that is stand-alone. This object has no relationship with any other running thread instance will be automatically deleted when the running thread instance exits, either by it's run method exiting, or explicity calling the exit member function.
ibrcommon::DetachedThread::DetachedThread | ( | size_t | size = DEFAULT_STACKSIZE | ) | [protected] |
Create a detached thread with a known context stack size.
size | of stack for thread context or 0 for default. |
Definition at line 343 of file Thread.cpp.
ibrcommon::DetachedThread::~DetachedThread | ( | ) | [pure virtual] |
Destroys object when thread context exits. Never externally deleted. Derived object may also have destructor to clean up thread-specific member data.
Definition at line 347 of file Thread.cpp.
void ibrcommon::DetachedThread::start | ( | int | priority = 0 | ) | throw (ThreadException) |
Start execution of detached context. This must be called after the object is created (perhaps with "new"). This method actually begins the new thread context, which then calls the object's run method.
priority | to start thread with. |
Definition at line 351 of file Thread.cpp.
References ibrcommon::Thread::exec_thread().
Referenced by dtn::api::ApiServer::componentRun(), and dtn::net::TCPConnection::initialize().
void ibrcommon::DetachedThread::stop | ( | ) | throw (ThreadException) |
Stop the execution of child context.
Definition at line 418 of file Thread.cpp.
References ibrcommon::Thread::cancel().
Referenced by dtn::net::TCPConnection::eventTimeout(), dtn::net::DatagramConnection::shutdown(), and dtn::net::TCPConnection::shutdown().