Indefinite observers and inline observers
authorJames Sedgwick <jsedgwick@fb.com>
Mon, 17 Nov 2014 23:26:00 +0000 (15:26 -0800)
committerDave Watson <davejwatson@fb.com>
Wed, 19 Nov 2014 20:52:39 +0000 (12:52 -0800)
commit55ee7359c4aa43ac5f3c2d5edb92717cc5284259
treef6f22d7f89984ba4902545b000161a90cc2e8e02
parentc3ee57ef0e487f62f4461e3073c3c75f17dc250f
Indefinite observers and inline observers

Summary:
provides new APIs observe(ObserverPtr<T>) and observe(Observer<T>*) that
are not associated with a subscription. The latter method avoids allocations at the cost of disowning responsiblity for object lifetimes.

It could be used for batch-allocating filter chains, for instance. I hacked up some recursive templates that would make that easy to do, but
haven't included them. I'd rather see the first use case and then decide whether to let users set them up themselves or to provide an
abstraction that makes it easier.

Test Plan: unit

Reviewed By: davejwatson@fb.com

Subscribers: folly-diffs@, fugalh, njormrod

FB internal diff: D1595200

Tasks: 5002278

Signature: t1:1595200:1416266578:95c0532af42443fd83e2f94d30790c3c0831ce65
folly/experimental/wangle/rx/Observable.h
folly/experimental/wangle/rx/Subject.h
folly/experimental/wangle/rx/Subscription.h
folly/experimental/wangle/rx/test/RxBenchmark.cpp [new file with mode: 0644]
folly/experimental/wangle/rx/test/RxTest.cpp
folly/experimental/wangle/rx/types.h