BatchDispatcher add() interface
authorShubhanshu Agrawal <shubhanshu@fb.com>
Tue, 11 Oct 2016 15:02:40 +0000 (08:02 -0700)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Tue, 11 Oct 2016 15:08:32 +0000 (08:08 -0700)
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

folly/fibers/BatchDispatcher.h

index 671675dd062ec46b04831f45dbacdef54c9737d5..dada4275165b69e8559ead78111f7efb22332622 100644 (file)
@@ -75,7 +75,7 @@ class BatchDispatcher {
       : executor_(executor),
         state_(new DispatchState(std::move(dispatchFunc))) {}
 
-  Future<ResultT> add(ValueT&& value) {
+  Future<ResultT> add(ValueT value) {
     if (state_->values.empty()) {
       executor_.add([state = state_]() { dispatchFunctionWrapper(*state); });
     }