// close_egtb() closes/frees tablebases if necessary
void close_egtb()
{
  if  (TbSize != 0)
  {
      tbcache_done();
      tb_done();
      paths = tbpaths_done(paths);
      TbSize = 0;
  }
}
Beispiel #2
0
/*
 * Unload all tablebases and destroy the thread used for probing
 * during search.
 */
void unload_gtb(void)
{
    if (!tb_is_initialized()) return;
    tbcache_done();
    tb_done();
    tb_paths = tbpaths_done(tb_paths);
    worker_quit = true;
    worker_task_ready = true;
#ifdef WINDOWS_THREADS
    while (worker_quit) Sleep(1);
    CloseHandle(worker_mutex);
    CloseHandle(worker_thread);
#else
    while (worker_quit) usleep(100);
    pthread_mutex_destroy(&worker_mutex);
#endif
}
Beispiel #3
0
Tablebase::~Tablebase() {
    tbcache_done();
    tb_done();
    paths = tbpaths_done(paths);
}
Beispiel #4
0
void GaviotaTb::freeTB() {
    tbcache_done();
    tb_done();
    paths = tbpaths_done(paths);
}
Beispiel #5
0
void gtb_clear()
{ tbcache_done();
  tb_done();
  tbpaths_done(gtb_paths);
}
Beispiel #6
0
GTB::~GTB() {
    tbcache_done();
    tb_done();
    paths = tbpaths_done(paths);
}