Code::Blocks  SVN r11506
Public Member Functions | Private Attributes | List of all members
BackgroundThread Class Reference

#include <backgroundthread.h>

Inheritance diagram for BackgroundThread:
Collaboration diagram for BackgroundThread:

Public Member Functions

 BackgroundThread (JobQueue *q, wxSemaphore *s, const bool owns_jobs=true)
 
 BackgroundThread (wxSemaphore *s, const bool owns_jobs=true)
 
 BackgroundThread (JobQueue *q, const bool owns_jobs=true)
 
 BackgroundThread (const bool owns_jobs=true)
 
 ~BackgroundThread () override
 
void Queue (AbstractJob *j)
 
void Die ()
 
void MarkDying ()
 
ExitCode Entry () override
 
- Public Member Functions inherited from wxThread
 wxThread (wxThreadKind kind=wxTHREAD_DETACHED)
 
virtual ~wxThread ()
 
wxThreadError Create (unsigned int stackSize=0)
 
wxThreadError Delete (ExitCode *rc=NULL, wxThreadWait waitMode=wxTHREAD_WAIT_BLOCK)
 
wxThreadIdType GetId () const
 
wxThreadKind GetKind () const
 
unsigned int GetPriority () const
 
bool IsAlive () const
 
bool IsDetached () const
 
bool IsPaused () const
 
bool IsRunning () const
 
wxThreadError Kill ()
 
wxThreadError Pause ()
 
wxThreadError Resume ()
 
wxThreadError Run ()
 
void SetPriority (unsigned int priority)
 
virtual bool TestDestroy ()
 
ExitCode Wait (wxThreadWait flags=wxTHREAD_WAIT_BLOCK)
 

Private Attributes

JobQueuequeue
 
wxSemaphoresemaphore
 
bool die
 
const bool ownsQueue
 
const bool ownsSemaphore
 
const bool ownsJobs
 

Additional Inherited Members

- Public Types inherited from wxThread
typedef void * ExitCode
 
- Static Public Member Functions inherited from wxThread
static int GetCPUCount ()
 
static wxThreadIdType GetCurrentId ()
 
static wxThreadIdType GetMainId ()
 
static bool IsMain ()
 
static bool SetConcurrency (size_t level)
 
static void Sleep (unsigned long milliseconds)
 
static wxThreadThis ()
 
static void Yield ()
 
- Protected Member Functions inherited from wxThread
void Exit (ExitCode exitcode=0)
 

Detailed Description

Definition at line 66 of file backgroundthread.h.

Constructor & Destructor Documentation

◆ BackgroundThread() [1/4]

BackgroundThread::BackgroundThread ( JobQueue q,
wxSemaphore s,
const bool  owns_jobs = true 
)
inline

Definition at line 76 of file backgroundthread.h.

◆ BackgroundThread() [2/4]

BackgroundThread::BackgroundThread ( wxSemaphore s,
const bool  owns_jobs = true 
)
inline

Definition at line 83 of file backgroundthread.h.

◆ BackgroundThread() [3/4]

BackgroundThread::BackgroundThread ( JobQueue q,
const bool  owns_jobs = true 
)
inline

Definition at line 90 of file backgroundthread.h.

◆ BackgroundThread() [4/4]

BackgroundThread::BackgroundThread ( const bool  owns_jobs = true)
inline

Definition at line 97 of file backgroundthread.h.

◆ ~BackgroundThread()

BackgroundThread::~BackgroundThread ( )
inlineoverride

Definition at line 104 of file backgroundthread.h.

References Delete().

Member Function Documentation

◆ Die()

void BackgroundThread::Die ( )
inline

Definition at line 119 of file backgroundthread.h.

References wxSemaphore::Post(), and wxMilliSleep().

Referenced by Death::operator()().

◆ Entry()

ExitCode BackgroundThread::Entry ( )
inlineoverridevirtual

Implements wxThread.

Definition at line 133 of file backgroundthread.h.

References JobQueue::Pop(), and wxSemaphore::Wait().

◆ MarkDying()

void BackgroundThread::MarkDying ( )
inline

Definition at line 127 of file backgroundthread.h.

Referenced by Agony::operator()().

◆ Queue()

void BackgroundThread::Queue ( AbstractJob j)
inline

Definition at line 113 of file backgroundthread.h.

References wxSemaphore::Post(), and JobQueue::Push().

Referenced by FileManager::Load().

Member Data Documentation

◆ die

bool BackgroundThread::die
private

Definition at line 70 of file backgroundthread.h.

◆ ownsJobs

const bool BackgroundThread::ownsJobs
private

Definition at line 73 of file backgroundthread.h.

◆ ownsQueue

const bool BackgroundThread::ownsQueue
private

Definition at line 71 of file backgroundthread.h.

◆ ownsSemaphore

const bool BackgroundThread::ownsSemaphore
private

Definition at line 72 of file backgroundthread.h.

◆ queue

JobQueue* BackgroundThread::queue
private

Definition at line 68 of file backgroundthread.h.

◆ semaphore

wxSemaphore* BackgroundThread::semaphore
private

Definition at line 69 of file backgroundthread.h.


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