darion-yaphet commented on code in PR #3638:
URL: https://github.com/apache/brpc/pull/3638#discussion_r4344300322
##########
test/bthread_key_unittest.cpp:
##########
@@ -566,6 +567,78 @@ 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:
In fact, the default value of the constructor is 1
(src/bthread/countdown_event.h:32):
`CountdownEvent(int initial_count = 1);`
Therefore, both of the current events will wait for the signal(). The issue
mentioned in the comment does not exist.
--
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]