via and activate/deactivate chaining
authorHans Fugal <fugalh@fb.com>
Fri, 5 Dec 2014 17:33:30 +0000 (09:33 -0800)
committerDave Watson <davejwatson@fb.com>
Thu, 11 Dec 2014 16:00:54 +0000 (08:00 -0800)
commitf2ae6aa71242720bd3e38dec9d9c827e9023c29a
tree2d2f532982b9eb6be00537dcd775ca04f074d026
parenta6eb914b25eaa73a567eaf508c2b19b9b7a7079f
via and activate/deactivate chaining

Summary:
Better support and test chaining of `via` and `activate`/`deactivate`.

The real problem is that without the ref qualifier a multiple chain of lvalue references can end up with a destructed object being referenced after.

https://akrzemi1.wordpress.com/2014/06/02/ref-qualifiers/

Test Plan:
This is mostly new tests that would fail and now pass.
I think maybe the tests are a bit weak, it would be good to find a way to ensure we aren't going to see the access-after-free bugs in these tests.

Reviewed By: jsedgwick@fb.com

Subscribers: trunkagent, fugalh, exa, njormrod, folly-diffs@

FB internal diff: D1714873

Tasks: 5489801

Signature: t1:1714873:1417628538:9e610c5ba5e0a22c19a11d53aa956be45d585058
folly/wangle/Future-inl.h
folly/wangle/Future.h
folly/wangle/test/FutureTest.cpp
folly/wangle/test/ViaTest.cpp