impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Apple (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] Avoid std::function when possible.
Date Sat, 26 Nov 2016 07:59:46 GMT
Jim Apple has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/5230

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
---
M be/src/service/fe-support.cc
M be/src/util/scope-exit-trigger.h
2 files changed, 22 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/30/5230/1
-- 
To view, visit http://gerrit.cloudera.org:8080/5230
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9dc034c2e094ea7f87f78d8d9101a71d8d2e295
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Jim Apple <jbapple@cloudera.com>

Mime
View raw message