Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/22614 )

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................

[util] introduce ThreadPoolToken::Close()

This patch introduces a means to protect a thread pool token from
submission of new tasks, while allowing all of its queued tasks to
complete before the token reaches terminal QUIESCED state.  That's the
main difference from ThreadPoolToken::Shutdown(), where all the token's
queued but not-yet-in-flight tasks are thrown out of the thread pool's
queue.  From this perspective, the newly introduced Close() method might
be considered as a graceful and asynchronous version of its Shutdown()
counterpart.

This patch also adds a few test scenarios to cover the crucial parts
of the newly introduced functionality.

Change-Id: Ic226319c191af666233ec735c1787389d051b039
Reviewed-on: http://gerrit.cloudera.org:8080/22614
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
---
M src/kudu/util/threadpool-test.cc
M src/kudu/util/threadpool.cc
M src/kudu/util/threadpool.h
3 files changed, 351 insertions(+), 28 deletions(-)

Approvals:
  Alexey Serbin: Looks good to me, approved; Verified

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 9
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to