Alexey Serbin has posted comments on this change. Change subject: Add ThreadRestrictions-aware LockGuard and UniqueLock ......................................................................
Patch Set 4: (2 comments) http://gerrit.cloudera.org:8080/#/c/7011/4//COMMIT_MSG Commit Message: PS4, Line 9: These are thin wrapper classes around std::lock_guard and : std::unique_lock that automatically call : ThreadRestrictions::AssertWaitAllowed() when acquiring locks. It seems I'm missing some context here. Why is it necessary to introduce such an automation? I thought the idea was to deliberately enforce specifying those places where wait is permitted. Is that about too many places where it would be necessary to do that if not introducing there wrappers? http://gerrit.cloudera.org:8080/#/c/7011/4/src/kudu/util/lock_guard.h File src/kudu/util/lock_guard.h: PS4, Line 35: ThreadRestrictions::AssertWaitAllowed(); : } : : ~LockGuard() {} Does it make sense to restore the original disposition of the 'wait allowed' constraint in the destructor? -- To view, visit http://gerrit.cloudera.org:8080/7011 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I87760f2721abab857165ad6e5ac6ac946992a927 Gerrit-PatchSet: 4 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Mike Percy <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-HasComments: Yes
