xiaoyifang opened a new issue, #5710: URL: https://github.com/apache/rocketmq/issues/5710
background: the CountDownLatch2 is only used in ServiceThread . it is a reimplementation of CountDownLatch and offered a new method reset. I think the CountDownLatch2 can be replace with java `Condition` class for the following reasons: 1, CountDownLatch does not offer reset ,as it was designed according to the javadoc ,  2, the instruction order in the ServiceThread is indefinit in some worst cases. the code is in the ServiceThread. and the reset in used in `waitForRuning`. https://github.com/apache/rocketmq/blob/aa7a442505ac012d1bc61b89bf10c41646a15005/common/src/main/java/org/apache/rocketmq/common/ServiceThread.java#L129-L141 in multithread environment.  the execution order will have different result ,and in the worst cases , `waitForRunning` will have to wait some extra `interval` more millionseconds. -- 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]
