git-hulk commented on PR #1855: URL: https://github.com/apache/kvrocks/pull/1855#issuecomment-1784081381
> I'm a bit confused about the ctor ordering here: > > 1. `Server::~Server` calls `cleanupExitedWorkerThreads()` > 2. cron calls `cleanupExitedWorkerThreads()` > > However, when `Join`, would the exited worker thread be cleaned? The `cron` thread periodic call `cleanupExitedWorkerThreads()` but it can't promise it will call `cleanupExitedWorkerThreads()` before exiting the cron thread. So for the server destructor, it MUST check again to prevent exceptions. -- 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]
