void CIteratorThread::RestartPrWinComputations() {
  if (p_engine_container->symbol_engine_isomaha()->isomaha()) {
    write_log(Preferences()->debug_prwin(), "[PrWinThread] Not restarting prwin computations, PrWin is Hold'em only\n");
    return;
  }
	write_log(Preferences()->debug_prwin(), "[PrWinThread] Restarting prwin computations.\n");
  assert(p_iterator_thread != NULL);
  assert(IteratorThreadWorking() == false);
  InitIteratorLoop();
  ResetIteratorVars();
	ResetGlobalVariables();
}
Example #2
0
CIteratorThread::CIteratorThread()
{
	write_log(preferences.debug_prwin(), "[PrWinThread] Iterator Thread starting.\n");

	// Create events
	_m_stop_thread = CreateEvent(0, TRUE, FALSE, 0);
	_m_wait_thread = CreateEvent(0, TRUE, FALSE, 0);

	// Initialize variables
	InitIteratorLoop();
	InitHandranktTableForPrwin();

	// FIRST mark thread as running,
	// THEN start thread.
	// The other way can lead to an ugly race-condition,
	// if the thread has already stopped, when we mark it as running.
	iter_vars.set_iterator_thread_running(true);
	AfxBeginThread(IteratorThreadFunction, this);

	write_log(preferences.debug_prwin(), "[PrWinThread] Iterator Thread started.\n");
}
void CIteratorThread::RestartPrWinComputations() {
	write_log(preferences.debug_prwin(), "[PrWinThread] Restarting prwin computations.\n");
  InitIteratorLoop();
  ResetIteratorVars();
	ResetGlobalVariables();
}