(Wangle) Implement collect* using mapSetCallback and shared_ptrs
authorHannes Roth <hannesr@fb.com>
Fri, 8 May 2015 23:34:32 +0000 (16:34 -0700)
committerPraveen Kumar Ramakrishnan <praveenr@fb.com>
Tue, 12 May 2015 00:02:48 +0000 (17:02 -0700)
commit4a92da5b87f3c4616e31875a4b62cca015ebea36
tree8ba299434e8e751257f1b4904d53c875538cf01a
parent5cc2f9945c169d3946963c6ee485e32eea407fac
(Wangle) Implement collect* using mapSetCallback and shared_ptrs

Summary:
I figured it would make sense to implement all the collect* functions using a shared_ptr<Context>, instead of doing our manual reference counting and all that. Fulfilling the promise in the destructor seemed like the icing on the cake. Also saves some line of code.

Test Plan: Run all the tests.

Reviewed By: hans@fb.com

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

FB internal diff: D2015320

Signature: t1:2015320:1431106133:ac3001b3696fc75230afe70908ed349102b02a45
folly/futures/Future-inl.h
folly/futures/Future.cpp
folly/futures/detail/Core.h