The Pedigree Project 0.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OwnedThread Class Reference

#include <OwnedThread.h>

+ Collaboration diagram for OwnedThread:

Public Member Functions

 OwnedThread (Thread *thread)
 
void adopt (Thread *thread)
 
void stop ()
 
void join ()
 
Threadget () const
 
Threadoperator-> () const
 
 operator bool () const
 

Private Member Functions

 OwnedThread (const OwnedThread &)=delete
 
OwnedThreadoperator= (const OwnedThread &)=delete
 

Private Attributes

Threadm_pThread
 

Detailed Description

Owns one joinable worker and makes cancellation plus joining part of the containing object's lifetime.

Definition at line 19 of file OwnedThread.h.

Constructor & Destructor Documentation

◆ OwnedThread() [1/2]

OwnedThread::OwnedThread ( )
inline

Definition at line 21 of file OwnedThread.h.

◆ OwnedThread() [2/2]

OwnedThread::OwnedThread ( Thread thread)
inlineexplicit

Definition at line 23 of file OwnedThread.h.

◆ ~OwnedThread()

OwnedThread::~OwnedThread ( )
inline

Definition at line 25 of file OwnedThread.h.

Member Function Documentation

◆ adopt()

void OwnedThread::adopt ( Thread thread)
inline

Definition at line 29 of file OwnedThread.h.

◆ get()

Thread * OwnedThread::get ( ) const
inline

Definition at line 61 of file OwnedThread.h.

◆ join()

void OwnedThread::join ( )
inline

Joins a worker whose containing object has published its own stop.

Definition at line 49 of file OwnedThread.h.

References Thread::joinForCompletion(), and panic().

Referenced by TextIO::initialise().

+ Here is the caller graph for this function:

◆ operator bool()

OwnedThread::operator bool ( ) const
inlineexplicit

Definition at line 69 of file OwnedThread.h.

◆ operator->()

Thread * OwnedThread::operator-> ( ) const
inline

Definition at line 65 of file OwnedThread.h.

◆ stop()

void OwnedThread::stop ( )
inline

Definition at line 36 of file OwnedThread.h.

Member Data Documentation

◆ m_pThread

Thread* OwnedThread::m_pThread
private

Definition at line 77 of file OwnedThread.h.


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