From: Marcin Siodelski Date: Tue, 20 Nov 2018 16:24:15 +0000 (+0100) Subject: [#260,!120] Minor fixes as a result of review. X-Git-Tag: 204-move-models-base~4^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75488d11eda05b6485acbaa6df12c2a8f1f4a3f7;p=thirdparty%2Fkea.git [#260,!120] Minor fixes as a result of review. --- diff --git a/src/lib/util/threads/tests/watched_thread_unittest.cc b/src/lib/util/threads/tests/watched_thread_unittest.cc index 0cdc8ce9e1..834dad0604 100644 --- a/src/lib/util/threads/tests/watched_thread_unittest.cc +++ b/src/lib/util/threads/tests/watched_thread_unittest.cc @@ -131,7 +131,7 @@ TEST_F(WatchedThreadTest, watchedThreadClassBasics) { ASSERT_FALSE(wthread_->isReady(WatchedThread::TERMINATE)); // Wait a little while. - nap(3); + nap(8); // Tell it to stop. wthread_->stop(); @@ -158,7 +158,7 @@ TEST_F(WatchedThreadTest, watchedThreadClassBasics) { ASSERT_FALSE(wthread_->isReady(WatchedThread::TERMINATE)); // Wait a little while. - nap(3); + nap(8); // It should now indicate an error. ASSERT_TRUE(wthread_->isReady(WatchedThread::ERROR)); @@ -189,7 +189,7 @@ TEST_F(WatchedThreadTest, watchedThreadClassBasics) { ASSERT_FALSE(wthread_->isReady(WatchedThread::TERMINATE)); // Wait a little while. - nap(3); + nap(8); // It should now indicate data ready. ASSERT_TRUE(wthread_->isReady(WatchedThread::READY)); diff --git a/src/lib/util/threads/watched_thread.h b/src/lib/util/threads/watched_thread.h index d0243be032..6a6855b387 100644 --- a/src/lib/util/threads/watched_thread.h +++ b/src/lib/util/threads/watched_thread.h @@ -111,7 +111,7 @@ public: /// -# READY - Marked as ready by the thread when it needs attention for a normal event /// (e.g. a thread used to receive data would mark READY when it has data available) /// -# TERMINATE - Marked as ready by WatchedThread owner to instruct the thread to - /// terminate. Worker functions must monitor TERMINATa by periodically calling + /// terminate. Worker functions must monitor TERMINATE by periodically calling /// @c shouldTerminate WatchSocket sockets_[TERMINATE + 1];