Пример #1
0
void TimerThread::restartTimer(int firstMs, int afterMs)
{
  // TODO(nodchip): スレッド競合に対処する
  this->timerPeriodFirstMs = firstMs;
  this->timerPeriodAfterMs = afterMs;
  first = true;
  notifyOne();
}
Пример #2
0
Thread::~Thread() {
	exit = true;
	notifyOne();

	handle.join(); // Wait for thread termination
}