mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 10:57:43 +00:00
Start sfen reader worker thread in the constructor.
This commit is contained in:
@@ -53,6 +53,10 @@ namespace Learner{
|
||||
end_of_files = false;
|
||||
shuffle = true;
|
||||
stop_flag = false;
|
||||
|
||||
file_worker_thread = std::thread([&] {
|
||||
this->file_read_worker();
|
||||
});
|
||||
}
|
||||
|
||||
~SfenReader()
|
||||
@@ -176,14 +180,6 @@ namespace Learner{
|
||||
|
||||
}
|
||||
|
||||
// Start a thread that loads the phase file in the background.
|
||||
void start_file_read_worker()
|
||||
{
|
||||
file_worker_thread = std::thread([&] {
|
||||
this->file_read_worker();
|
||||
});
|
||||
}
|
||||
|
||||
void file_read_worker()
|
||||
{
|
||||
std::string currentFilename;
|
||||
|
||||
Reference in New Issue
Block a user