impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Impala Public Jenkins (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] Avoid std::function when possible.
Date Mon, 05 Dec 2016 22:37:37 GMT
Impala Public Jenkins has submitted this change and it was merged.

Change subject: Avoid std::function when possible.
......................................................................


Avoid std::function when possible.

std::function does some tricky stuff under the hood, and can in fact
throw in its constructor when it allocates heap memory. This patch
changes ScopeExitTrigger to use templates instead, avoiding the
complexity of std::function. It uses a std::make_pair-like constructor
helper so clients don't have to try to name the types of lambdas.

Change-Id: If9dc034c2e094ea7f87f78d8d9101a71d8d2e295
Reviewed-on: http://gerrit.cloudera.org:8080/5230
Reviewed-by: Jim Apple <jbapple-impala@apache.org>
Tested-by: Impala Public Jenkins
---
M be/src/service/fe-support.cc
M be/src/util/scope-exit-trigger.h
2 files changed, 22 insertions(+), 6 deletions(-)

Approvals:
  Impala Public Jenkins: Verified
  Jim Apple: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: If9dc034c2e094ea7f87f78d8d9101a71d8d2e295
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Jim Apple <jbapple-impala@apache.org>
Gerrit-Reviewer: Henry Robinson <henry@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jim Apple <jbapple-impala@apache.org>
Gerrit-Reviewer: Marcel Kornacker <marcel@cloudera.com>

Mime
View raw message