Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends

SgUctSearch::Thread Class Reference

List of all members.

Classes

class  Function
 Copyable function object that invokes Thread::operator(). More...

Public Member Functions

 Thread (SgUctSearch &search, std::auto_ptr< SgUctThreadState > state)
 ~Thread ()
void StartPlay ()
void WaitPlayFinished ()

Public Attributes

std::auto_ptr< SgUctThreadStatem_state

Private Member Functions

void operator() ()
void PlayGames ()

Private Attributes

SgUctSearchm_search
bool m_quit
boost::barrier m_threadReady
boost::mutex m_startPlayMutex
boost::mutex m_playFinishedMutex
boost::condition m_startPlay
boost::condition m_playFinished
boost::mutex::scoped_lock m_playFinishedLock
GlobalLock m_globalLock
boost::thread m_thread
 The thread.

Friends

class Thread::Function

Detailed Description

Definition at line 863 of file SgUctSearch.h.


Constructor & Destructor Documentation

SgUctSearch::Thread::Thread ( SgUctSearch search,
std::auto_ptr< SgUctThreadState state 
)

Definition at line 165 of file SgUctSearch.cpp.

References m_threadReady.

SgUctSearch::Thread::~Thread (  ) 

Definition at line 182 of file SgUctSearch.cpp.

References m_quit, m_thread, and StartPlay().


Member Function Documentation

void SgUctSearch::Thread::operator() (  )  [private]
void SgUctSearch::Thread::PlayGames (  )  [private]
void SgUctSearch::Thread::StartPlay (  ) 

Definition at line 209 of file SgUctSearch.cpp.

References m_startPlay, and m_startPlayMutex.

Referenced by ~Thread().

void SgUctSearch::Thread::WaitPlayFinished (  ) 

Definition at line 214 of file SgUctSearch.cpp.

References m_playFinished, and m_playFinishedLock.


Friends And Related Function Documentation

friend class Thread::Function [friend]

Definition at line 891 of file SgUctSearch.h.


Member Data Documentation

Definition at line 909 of file SgUctSearch.h.

Referenced by operator()().

boost::condition SgUctSearch::Thread::m_playFinished [private]

Definition at line 905 of file SgUctSearch.h.

Referenced by operator()(), and WaitPlayFinished().

boost::mutex::scoped_lock SgUctSearch::Thread::m_playFinishedLock [private]

Definition at line 907 of file SgUctSearch.h.

Referenced by WaitPlayFinished().

Definition at line 901 of file SgUctSearch.h.

Referenced by operator()().

Definition at line 895 of file SgUctSearch.h.

Referenced by operator()(), and ~Thread().

Definition at line 893 of file SgUctSearch.h.

Referenced by operator()().

boost::condition SgUctSearch::Thread::m_startPlay [private]

Definition at line 903 of file SgUctSearch.h.

Referenced by operator()(), and StartPlay().

boost::mutex SgUctSearch::Thread::m_startPlayMutex [private]

Definition at line 899 of file SgUctSearch.h.

Referenced by operator()(), and StartPlay().

Definition at line 866 of file SgUctSearch.h.

Referenced by operator()().

boost::thread SgUctSearch::Thread::m_thread [private]

The thread.

Order dependency: must be constructed as the last member, because the constructor starts the thread.

Definition at line 914 of file SgUctSearch.h.

Referenced by ~Thread().

boost::barrier SgUctSearch::Thread::m_threadReady [private]

Definition at line 897 of file SgUctSearch.h.

Referenced by operator()(), and Thread().


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


Sun Mar 13 2011 Doxygen 1.7.1