void TimerThread::restartTimer(int firstMs, int afterMs) { // TODO(nodchip): スレッド競合に対処する this->timerPeriodFirstMs = firstMs; this->timerPeriodAfterMs = afterMs; first = true; notifyOne(); }
Thread::~Thread() { exit = true; notifyOne(); handle.join(); // Wait for thread termination }