Folly
的余下内容分为
-
- []
synchronization
- []
-
- []
memory
- []
-
- []
logging
- []
-
- []
io
- []
-
- []
gen
- []
-
- []
fibers
- []
-
- []
executors
- []
-
- []
concurrency
- []
classDiagram
Executor
Executor <|-- IOExecutor
Executor <|-- ThreadPoolExecutor
IOExecutor <|-- IOThreadPoolExecutor
ThreadPoolExecutor <|-- IOThreadPoolExecutor
ThreadPoolExecutor <|-- CPUThreadPoolExecutor
Executor <|-- DrivableExecutor
Executor <|-- ManualExecutor
Executor
KeepAlive
是对 Executor
的平安援用,Executor
析构时会 join
所有 KeepAlive
对象。
ThreadExecutor
对于每个 task
启动一个线程执行,通过 channel
告诉工作增加、删除、完结。golang
中的select channel
用法。
ThreadPoolExecutor
IO/CPUThreadPoolExecutor
的基类,提供了统计性能等通用信息。
IOThreadPoolExecutor
提供多个 ioThread
,每个ioThread
容许event_base loop
。