BenBot 1.7.5
A chess engine
Loading...
Searching...
No Matches
ben_bot::search::Thread Struct Referencefinal

#include <libbenbot/search/Thread.hpp>

Collaboration diagram for ben_bot::search::Thread:

Public Member Functions

 Thread ()=default
 Thread (Callbacks &&callbacksToUse)
 Thread (const Thread &)=delete
 Thread (Thread &&)=delete
 ~Thread ()
Threadoperator= (const Thread &)=delete
Threadoperator= (Thread &&)=delete
void start ()

Public Attributes

Context context

Detailed Description

A worker thread that can be used to execute a search.

Definition at line 41 of file Thread.hpp.

Constructor & Destructor Documentation

◆ Thread() [1/4]

ben_bot::search::Thread::Thread ( )
default

Creates a searcher thread with an empty set of result callbacks.

◆ Thread() [2/4]

ben_bot::search::Thread::Thread ( Callbacks && callbacksToUse)
explicit

Creates a searcher thread with a specified set of result callbacks. Note that the result callbacks will be invoked on the background thread.

◆ ~Thread()

ben_bot::search::Thread::~Thread ( )

◆ Thread() [3/4]

ben_bot::search::Thread::Thread ( const Thread & )
delete

◆ Thread() [4/4]

ben_bot::search::Thread::Thread ( Thread && )
delete

Member Function Documentation

◆ operator=() [1/2]

Thread & ben_bot::search::Thread::operator= ( const Thread & )
delete

◆ operator=() [2/2]

Thread & ben_bot::search::Thread::operator= ( Thread && )
delete

◆ start()

void ben_bot::search::Thread::start ( )
inline

Begins searching asynchronously. This method returns immediately, and the actual search will be performed by a background thread.

Definition at line 67 of file Thread.hpp.

Member Data Documentation

◆ context

Context ben_bot::search::Thread::context

The context used for this thread's searches. Note that the background thread will reference this object, so it should only be modified after calling context.wait().

Definition at line 61 of file Thread.hpp.


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