IBR-DTNSuite  0.8
ibrcommon::DetachedThread Class Reference

#include <Thread.h>

Inheritance diagram for ibrcommon::DetachedThread:
Collaboration diagram for ibrcommon::DetachedThread:

List of all members.

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)

Detailed Description

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.

Author:
David Sugar <dyfet@gnutelephony.org>

Definition at line 246 of file Thread.h.


Constructor & Destructor Documentation

Create a detached thread with a known context stack size.

Parameters:
sizeof stack for thread context or 0 for default.

Definition at line 343 of file Thread.cpp.

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.


Member Function Documentation

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.

Parameters:
priorityto 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().

Here is the call graph for this function:

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().

Here is the call graph for this function:


The documentation for this class was generated from the following files: