darion-yaphet commented on code in PR #3638:
URL: https://github.com/apache/brpc/pull/3638#discussion_r4344997511


##########
test/bthread_key_unittest.cpp:
##########
@@ -566,6 +567,80 @@ TEST(KeyTest, borrow_and_return_keytable_when_using_pool) {
     ASSERT_EQ(0, bthread_keytable_pool_destroy(&test_pool));
 }
 
+struct ConcurrentPoolData {
+    bthread_keytable_pool_t pool;
+    CountdownEvent ready;
+    CountdownEvent start;
+    CountdownEvent destroyed;
+    Counters counters;
+
+    explicit ConcurrentPoolData(int nworkers) : ready(nworkers) {}

Review Comment:
   `CountdownEvent` defaults to an initial count of 1, so both events already 
wait until `signal()` is called. 
   
   Explicit initialization could improve readability, but it is not required 
for correctness here.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to