You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/09/25 15:44:38 UTC

[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #919: Fix many typo in cluster.cc

PragmaTwice commented on code in PR #919:
URL: https://github.com/apache/incubator-kvrocks/pull/919#discussion_r979423320


##########
tests/cppunit/rwlock_test.cc:
##########
@@ -167,7 +167,7 @@ TEST(ReadWriteLock, WriteLockGurad_First) {
       });
     } else {
       ths[i] = std::thread([&rwlock, &val]() {
-        usleep(1000);  // To avoid it is the first to run, just sleep 100ms
+        usleep(100000);  // To avoid it is the first to run, just sleep 100ms

Review Comment:
   ```suggestion
           using namespace std::chrono_literals;
           std::this_thread::sleep_for(100ms);  // To avoid it is the first to run, just sleep 100ms
   ```
   
   We can use the time literal `100ms` directly, haha : )



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org