Definition at line 926 of file SgUctSearch.h.
Public Member Functions | |
Thread (SgUctSearch &search, std::auto_ptr< SgUctThreadState > state) | |
~Thread () | |
void | StartPlay () |
void | WaitPlayFinished () |
Public Attributes | |
std::auto_ptr< SgUctThreadState > | m_state |
Private Member Functions | |
void | operator() () |
void | PlayGames () |
Private Attributes | |
SgUctSearch & | m_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 |
Classes | |
class | Function |
Copyable function object that invokes Thread::operator(). More... |
SgUctSearch::Thread::Thread | ( | SgUctSearch & | search, | |
std::auto_ptr< SgUctThreadState > | state | |||
) |
SgUctSearch::Thread::~Thread | ( | ) |
void SgUctSearch::Thread::operator() | ( | ) | [private] |
Definition at line 146 of file SgUctSearch.cpp.
References DEBUG_THREADS, m_globalLock, m_playFinished, m_playFinishedMutex, m_quit, m_search, m_startPlay, m_startPlayMutex, m_state, m_threadReady, Notify(), SgUctSearch::SearchLoop(), and SgDebug().
void SgUctSearch::Thread::PlayGames | ( | ) | [private] |
void SgUctSearch::Thread::StartPlay | ( | ) |
Definition at line 166 of file SgUctSearch.cpp.
References m_startPlay, m_startPlayMutex, and Notify().
Referenced by ~Thread().
void SgUctSearch::Thread::WaitPlayFinished | ( | ) |
friend class Thread::Function [friend] |
Definition at line 955 of file SgUctSearch.h.
GlobalLock SgUctSearch::Thread::m_globalLock [private] |
boost::condition SgUctSearch::Thread::m_playFinished [private] |
boost::mutex::scoped_lock SgUctSearch::Thread::m_playFinishedLock [private] |
boost::mutex SgUctSearch::Thread::m_playFinishedMutex [private] |
bool SgUctSearch::Thread::m_quit [private] |
SgUctSearch& SgUctSearch::Thread::m_search [private] |
boost::condition SgUctSearch::Thread::m_startPlay [private] |
boost::mutex SgUctSearch::Thread::m_startPlayMutex [private] |
std::auto_ptr<SgUctThreadState> SgUctSearch::Thread::m_state |
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 979 of file SgUctSearch.h.
Referenced by ~Thread().
boost::barrier SgUctSearch::Thread::m_threadReady [private] |