Commit 0f3fabf1 authored by Dave Watson's avatar Dave Watson Committed by Alecs King

attempt at putting thrift2 on ChannelPipeline

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
parent 42ab2462
...@@ -115,6 +115,10 @@ class ChannelHandlerPtr : public ChannelHandler< ...@@ -115,6 +115,10 @@ class ChannelHandlerPtr : public ChannelHandler<
explicit ChannelHandlerPtr(HandlerPtr handler) explicit ChannelHandlerPtr(HandlerPtr handler)
: handler_(std::move(handler)) {} : handler_(std::move(handler)) {}
HandlerPtr getHandler() {
return handler_;
}
void setHandler(HandlerPtr handler) { void setHandler(HandlerPtr handler) {
if (handler == handler_) { if (handler == handler_) {
return; return;
......
...@@ -186,8 +186,6 @@ class ChannelPipeline<R, W, Handler, Handlers...> ...@@ -186,8 +186,6 @@ class ChannelPipeline<R, W, Handler, Handlers...>
~ChannelPipeline() {} ~ChannelPipeline() {}
void destroy() override { }
void read(R msg) { void read(R msg) {
typename ChannelPipeline<R, W>::DestructorGuard dg( typename ChannelPipeline<R, W>::DestructorGuard dg(
static_cast<DelayedDestruction*>(this)); static_cast<DelayedDestruction*>(this));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment