(Wangle) unorderedReduce
authorHannes Roth <hannesr@fb.com>
Thu, 14 May 2015 22:36:27 +0000 (15:36 -0700)
committerViswanath Sivakumar <viswanath@fb.com>
Wed, 20 May 2015 17:57:10 +0000 (10:57 -0700)
commite872b4400ebf7d68f9b0fca1b3b851556d22513a
tree945ccf05696a9c0db4befa9eea9880a832f5c730
parent0593c2242fcbf86010f9399e5655186e9534e71a
(Wangle) unorderedReduce

Summary:
Use this if you don't need the order of the input, e.g. summing up
values. This constructs a separate Future chain to do the reducing,
because we don't want to add locking while reducing. The only lock
necessary is when adding a new Future to the chain, which should be
really quick.

Test Plan: Run all the tests.

Reviewed By: hans@fb.com

Subscribers: folly-diffs@, jsedgwick, yfeldblum, chalfant

FB internal diff: D2015326

Tasks: 6025252

Signature: t1:2015326:1431557191:9ea2edccb0162dedf067b5b3300de2fe72a1a4c9
folly/futures/Future-inl.h
folly/futures/helpers.h
folly/futures/test/FutureTest.cpp