remove Cpp2WorkerFactory
authorDave Watson <davejwatson@fb.com>
Thu, 18 Dec 2014 17:48:05 +0000 (09:48 -0800)
committerJoelMarcey <joelm@fb.com>
Thu, 18 Dec 2014 20:29:41 +0000 (12:29 -0800)
commit8b3f89ae47aa4bd2bd1be0507c2483ca3d267993
tree651e68abbe47950da644ac6d9258c3debd438cb7
parentc1a244da6daacd948fdbda1d0770372623101fb7
remove Cpp2WorkerFactory

Summary:
In preparation for a global IOThreadPoolExecutor - we can't override the workerFactory if we are using a global one.

Instead, add a new getEventBases() to IOTHreadPoolExecutro and just run code on each eventBase.  For shutdown, explicitly add a stop(), instead of doing the work after loop() as exited

Cpp2Worker required minor changes to be able to use EventBaseManager's eventbase vs. their own

Test Plan: fbconfig -r thrift/lib/cpp2; fbmake runtests

Reviewed By: jsedgwick@fb.com

Subscribers: trunkagent, andrewcox, doug, fugalh, alandau, bmatheny, mshneer, folly-diffs@

FB internal diff: D1734795

Signature: t1:1734795:1418759367:b45f419e5cbc482a64a5873d9e00e3bcb071db5a
folly/experimental/wangle/concurrent/IOThreadPoolExecutor.cpp
folly/experimental/wangle/concurrent/IOThreadPoolExecutor.h
folly/experimental/wangle/concurrent/NamedThreadFactory.h