Manage handlers with shared_ptrs, introduce StaticPipeline
authorJames Sedgwick <jsedgwick@fb.com>
Mon, 27 Apr 2015 18:44:31 +0000 (11:44 -0700)
committerAlecs King <int@fb.com>
Mon, 27 Apr 2015 23:55:07 +0000 (16:55 -0700)
commit4f7459c35f98f5657cb864d2e9c4cc3e3cbf8080
tree72c80a376fd91bbea4d722d2f857f05a5333e35e
parentabdd128c348e8c7406745660eda3d22cddf05a1b
Manage handlers with shared_ptrs, introduce StaticPipeline

Summary:
A few things:
- Eliminate HandlerPtr by managing all handlers with shared_ptrs instead of keeping them inline in the pipeline
- Kill recursively templated ChannelPipeline accordingly
- Introduce StaticPipeline to retain the flexibility of zero-alloc pipelines
- Introduce notion of an "owning handler" to avoid destruction order issues

Test Plan: unit (will add more), thrift unit

Reviewed By: davejwatson@fb.com

Subscribers: fugalh, alandau, bmatheny, folly-diffs@, jsedgwick, yfeldblum, chalfant

FB internal diff: D2023976

Tasks: 6836580

Signature: t1:2023976:1430159578:e50e8a149e549a40670d093fb65987a4843cdd8d
folly/Makefile.am
folly/wangle/bootstrap/BootstrapTest.cpp
folly/wangle/bootstrap/ServerBootstrap-inl.h
folly/wangle/channel/Handler.h
folly/wangle/channel/HandlerContext.h
folly/wangle/channel/Pipeline.h
folly/wangle/channel/StaticPipeline.h [new file with mode: 0644]
folly/wangle/channel/test/OutputBufferingHandlerTest.cpp
folly/wangle/channel/test/PipelineTest.cpp
folly/wangle/service/ClientDispatcher.h