Make sfen reader only stop when it's destroyed. Now it is fully RAII.

This commit is contained in:
Tomasz Sobczyk
2020-10-22 14:46:19 +02:00
committed by nodchip
parent c58aa9696a
commit ad3d1b42e4
2 changed files with 2 additions and 9 deletions
+2 -5
View File
@@ -61,6 +61,8 @@ namespace Learner{
~SfenReader()
{
stop_flag = true;
if (file_worker_thread.joinable())
file_worker_thread.join();
}
@@ -310,11 +312,6 @@ namespace Learner{
}
}
void stop()
{
stop_flag = true;
}
void set_do_shuffle(bool v)
{
shuffle = v;