Yifan Zhang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18867 )

Change subject: [threadpool] Fix unsafe behaviour when SchedulerThread shutdown
......................................................................


Patch Set 17:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/18867/16//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/18867/16//COMMIT_MSG@9
PS16, Line 9: When shutting down a thread pool with SchedulerThread, thread 
pool's variable
            : 'scheduler_' is deleted and set to nullptr, at the same time, if 
thread pool
            : token is not shutdown and a task is scheduled on the toke
> The first question, yes. The shutdown order is needed by before, not the pa
Could you explain what scenario we need to call token->Schedule() after 
shutting down the thread pool? As far as I can see, we won't call 
token->Submit() in the existing code base, and it's also unsafe to do so. 
That's to say, ThreadPoolToken is only valid for the lifetime of ThreadPool.



--
To view, visit http://gerrit.cloudera.org:8080/18867
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I021422f7e51e1007c5bdbc877ab445f70ba12357
Gerrit-Change-Number: 18867
Gerrit-PatchSet: 17
Gerrit-Owner: Yuqi Du <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <[email protected]>
Gerrit-Reviewer: Yingchun Lai <[email protected]>
Gerrit-Reviewer: Yuqi Du <[email protected]>
Gerrit-Comment-Date: Wed, 19 Oct 2022 08:05:49 +0000
Gerrit-HasComments: Yes

Reply via email to