ThreadPoolExecutor and its children CPUThreadPoolExecutor and IOThreadPoolExecutor
authorJames Sedgwick <jsedgwick@fb.com>
Wed, 17 Sep 2014 09:58:06 +0000 (02:58 -0700)
committerDave Watson <davejwatson@fb.com>
Wed, 17 Sep 2014 18:23:48 +0000 (11:23 -0700)
commit79b9cc5f830d8b92abeb29e180a30f75804259d0
tree785b869beeb178f4d37458f3d04c3e0639c2f05d
parenta03331d8d54b142fb0ff137dd3f37b10b9bd1bc8
ThreadPoolExecutor and its children CPUThreadPoolExecutor and IOThreadPoolExecutor

Summary:
Spun off from https://phabricator.fb.com/D1534506 as this seemed different enough for a new diff

Similar to previous diff but attempts to reuse a common thread management process between cpu and io bound thread pools. Also sets the stage for other common functionality, e.g. stats, monitoring, timeouts, and so on

Here is some output from the queue benchmark in common/concurrent with both of these pools added (changes to BM not in this diff): https://phabricator.fb.com/P16308560

Test Plan: added a unit test, ran benchmark

Reviewed By: davejwatson@fb.com

Subscribers: fugalh, njormrod, bmatheny

FB internal diff: D1555443

Tasks: 50023925002425
12 files changed:
folly/experimental/wangle/concurrent/BlockingQueue.h [new file with mode: 0644]
folly/experimental/wangle/concurrent/CPUThreadPoolExecutor.cpp [new file with mode: 0644]
folly/experimental/wangle/concurrent/CPUThreadPoolExecutor.h [new file with mode: 0644]
folly/experimental/wangle/concurrent/Executor.h [new file with mode: 0644]
folly/experimental/wangle/concurrent/IOThreadPoolExecutor.cpp [new file with mode: 0644]
folly/experimental/wangle/concurrent/IOThreadPoolExecutor.h [new file with mode: 0644]
folly/experimental/wangle/concurrent/LifoSemMPMCQueue.h [new file with mode: 0644]
folly/experimental/wangle/concurrent/NamedThreadFactory.h [new file with mode: 0644]
folly/experimental/wangle/concurrent/ThreadFactory.h [new file with mode: 0644]
folly/experimental/wangle/concurrent/ThreadPoolExecutor.cpp [new file with mode: 0644]
folly/experimental/wangle/concurrent/ThreadPoolExecutor.h [new file with mode: 0644]
folly/experimental/wangle/concurrent/test/ThreadPoolExecutorTest.cpp [new file with mode: 0644]