Hello Andrew Wong,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/8583
to review the following change.
Change subject: Add scoped macros to allow/disallow IO and waiting
......................................................................
Add scoped macros to allow/disallow IO and waiting
This patch takes the existing ScopedAllowIO/Wait helper classes, part of
the ThreadRestrictions utility library, and makes the following
improvements:
1. Allows for expressing a "scoped disallow" in addition to the
"scoped allow" for IO and waiting.
2. Creates macros to easily instantiate the scoped objects.
It is useful to be able to express a "scoped disallow" because a thread
that may perform I/O may have critical sections where I/O should not be
performed due to the risk of device failure. Instantiating a "scoped
disallow" for IO establishes an invariant that can be used to help
future-proof IO-free sections of code.
This patch also extends the existing unit tests to provide coverage for
the "scoped disallow" functionality.
Change-Id: I47725fc0c62dfa0b48d76c169ed8fd6a500599a6
---
M src/kudu/client/client-internal.cc
M src/kudu/rpc/messenger.cc
M src/kudu/rpc/rpc_stub-test.cc
M src/kudu/util/thread-test.cc
M src/kudu/util/thread_restrictions.h
5 files changed, 42 insertions(+), 15 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/83/8583/1
--
To view, visit http://gerrit.cloudera.org:8080/8583
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I47725fc0c62dfa0b48d76c169ed8fd6a500599a6
Gerrit-Change-Number: 8583
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Percy <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>