From: Shubhanshu Agrawal Date: Tue, 11 Oct 2016 15:02:40 +0000 (-0700) Subject: BatchDispatcher add() interface X-Git-Tag: v2016.10.17.00~17 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=fb77b40718ec1ce41e8e7625cfb44dc2d7ba0229;p=folly.git BatchDispatcher add() interface Summary: converting add(value&&) to add(value) to make it easier for callsites to use. Reviewed By: A5he Differential Revision: D4000416 fbshipit-source-id: c66f4d93d1223286bbc786d17f65ed02a63cc794 --- diff --git a/folly/fibers/BatchDispatcher.h b/folly/fibers/BatchDispatcher.h index 671675dd..dada4275 100644 --- a/folly/fibers/BatchDispatcher.h +++ b/folly/fibers/BatchDispatcher.h @@ -75,7 +75,7 @@ class BatchDispatcher { : executor_(executor), state_(new DispatchState(std::move(dispatchFunc))) {} - Future add(ValueT&& value) { + Future add(ValueT value) { if (state_->values.empty()) { executor_.add([state = state_]() { dispatchFunctionWrapper(*state); }); }