#include <Thread.h>

Public Member Functions | |
| bool | isRunning (void) |
| void | start (int priority=0) |
| void | background (void) |
| void | waitFor () |
Protected Member Functions | |
| JoinableThread (size_t size=0) | |
| virtual | ~JoinableThread () |
| void | join (void) |
Definition at line 120 of file Thread.h.
| ibrcommon::JoinableThread::JoinableThread | ( | size_t | size = 0 |
) | [protected] |
Create a joinable thread with a known context stack size.
| size | of stack for thread context or 0 for default. |
Definition at line 84 of file Thread.cpp.
References ibrcommon::Thread::stack.
| ibrcommon::JoinableThread::~JoinableThread | ( | ) | [protected, virtual] |
Delete child thread. Parent thread suspends until child thread run method completes or child thread calls it's exit method.
Definition at line 90 of file Thread.cpp.
References join().
| void ibrcommon::JoinableThread::join | ( | void | ) | [protected] |
Join thread with parent. Calling from a child thread to exit is now depreciated behavior and in the future will not be supported. Threads should always return through their run() method.
Definition at line 129 of file Thread.cpp.
References ibrcommon::Thread::equal(), ibrcommon::Thread::exit(), and ibrcommon::Thread::tid.
Referenced by dtn::net::UDPConvergenceLayer::componentDown(), dtn::net::DiscoveryAgent::componentDown(), dtn::core::WallClock::componentDown(), ibrcommon::SimpleTimer::remove(), ibrcommon::MultiTimer::removeAll(), ibrcommon::Timer::stop(), waitFor(), dtn::daemon::ClientHandler::~ClientHandler(), dtn::routing::EpidemicRoutingExtension::~EpidemicRoutingExtension(), dtn::daemon::IndependentComponent::~IndependentComponent(), ~JoinableThread(), ibrcommon::MultiTimer::~MultiTimer(), dtn::routing::NeighborRoutingExtension::~NeighborRoutingExtension(), dtn::core::SQLiteBundleStorage::~SQLiteBundleStorage(), and dtn::routing::BaseRouter::ThreadedExtension::~ThreadedExtension().
| bool ibrcommon::JoinableThread::isRunning | ( | void | ) | [inline] |
Test if thread is currently running.
Reimplemented in dtn::daemon::IndependentComponent.
| void ibrcommon::JoinableThread::start | ( | int | priority = 0 |
) |
Start execution of child context. This must be called after the child object is created (perhaps with "new") and before it can be joined. This method actually begins the new thread context, which then calls the object's run method. Optionally raise the priority of the thread when it starts under realtime priority.
| priority | of child thread. |
Definition at line 95 of file Thread.cpp.
References ibrcommon::Thread::priority, ibrcommon::Thread::stack, and ibrcommon::Thread::tid.
Referenced by dtn::daemon::ApiServer::accept(), background(), dtn::daemon::StatisticLogger::componentUp(), dtn::routing::BaseRouter::componentUp(), and dtn::daemon::IndependentComponent::startup().
| void ibrcommon::JoinableThread::background | ( | void | ) | [inline] |
| void ibrcommon::JoinableThread::waitFor | ( | ) |
1.5.6