Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18674 )
Change subject: [threadpool] Fix scheduler thread a coredump bug ...................................................................... Patch Set 43: Code-Review-1 (2 comments) http://gerrit.cloudera.org:8080/#/c/18674/43/src/kudu/util/threadpool.h File src/kudu/util/threadpool.h: http://gerrit.cloudera.org:8080/#/c/18674/43/src/kudu/util/threadpool.h@168 PS43, Line 168: token->Schedule > The return status can deal by users according to their scenarios. In example you are supposed to show how to use API properly, even if it's 'generally returns OK'. Please fix that. http://gerrit.cloudera.org:8080/#/c/18674/43/src/kudu/util/threadpool.h@172 PS43, Line 172: // ThreadPoolToken* t = token.release(); // delete the token(s). : // delete t; : // ThreadPool* pool = scheduler_pool.release(); // release scheduler_pool. : // delete pool; > The reason of scheduler_pool.Shutdown before token release, the scheduler_p My question was about why to call release on the entities which are about to release automatically, and in correct order in this case. C++ guaranties that 'token' will be deleted first and then 'pool' will be deleted once given their order of declaration/definition above. -- To view, visit http://gerrit.cloudera.org:8080/18674 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie5bc5511a745f3dc12dfe1a6a1813ece41ccc2a8 Gerrit-Change-Number: 18674 Gerrit-PatchSet: 43 Gerrit-Owner: Yuqi Du <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Reviewer: Yuqi Du <[email protected]> Gerrit-Comment-Date: Mon, 25 Jul 2022 18:35:39 +0000 Gerrit-HasComments: Yes
