attempt at putting thrift2 on ChannelPipeline
authorDave Watson <davejwatson@fb.com>
Fri, 27 Feb 2015 18:14:46 +0000 (10:14 -0800)
committerAlecs King <int@fb.com>
Tue, 3 Mar 2015 03:30:41 +0000 (19:30 -0800)
Summary:
Basically a ripoff of Dave's D1483148 but with ChannelPipeline instead of rx.
There's going to be a long tail of unit tests here, this is still pretty broken...

Not convinced that this is the way to go but I wanted to get a feel for what it would be like to plug it into an IRL system.
I think the simplicity/clarity of the handler implementations and to some extent the pipeline spec is an improvement over the rx way
but I'm less sure about everything else.

Test Plan: compiles and kind of works some of the time but not really

Reviewed By: alandau@fb.com

Subscribers: wormhole-diffs@, mcduff, hitesh, doug, yfeldblum, folly-diffs@, jsedgwick, subodh, andrewcox, njormrod, trunkagent, fugalh, alandau, bmatheny, mshneer

FB internal diff: D1618704

Tasks: 5981284

Signature: t1:1618704:1424980854:83c6193b1156be2ec65cf79f9f2ad1af670da7f8

folly/wangle/channel/ChannelHandler.h
folly/wangle/channel/ChannelPipeline.h

index da52842624ea2e5e2b21b5749873a391d8dd92d2..e1aa6d5e22da2b943761aa8a986c826cf8f7b51a 100644 (file)
@@ -115,6 +115,10 @@ class ChannelHandlerPtr : public ChannelHandler<
   explicit ChannelHandlerPtr(HandlerPtr handler)
     : handler_(std::move(handler)) {}
 
+  HandlerPtr getHandler() {
+    return handler_;
+  }
+
   void setHandler(HandlerPtr handler) {
     if (handler == handler_) {
       return;
index a7458f210a52c8d931828e7aa646ee52b03a4051..02cfb603dd5c3a355a882e17e88541d704564d34 100644 (file)
@@ -186,8 +186,6 @@ class ChannelPipeline<R, W, Handler, Handlers...>
 
   ~ChannelPipeline() {}
 
-  void destroy() override { }
-
   void read(R msg) {
     typename ChannelPipeline<R, W>::DestructorGuard dg(
         static_cast<DelayedDestruction*>(this));