proxygen
|
#include <ServerBootstrap-inl.h>
Public Member Functions | |
ServerWorkerPool (std::shared_ptr< AcceptorFactory > acceptorFactory, folly::IOThreadPoolExecutor *exec, std::shared_ptr< std::vector< std::shared_ptr< folly::AsyncSocketBase >>> sockets, std::shared_ptr< ServerSocketFactory > socketFactory) | |
template<typename F > | |
void | forEachWorker (F &&f) const |
void | threadStarted (folly::ThreadPoolExecutor::ThreadHandle *) override |
void | threadStopped (folly::ThreadPoolExecutor::ThreadHandle *) override |
void | threadPreviouslyStarted (folly::ThreadPoolExecutor::ThreadHandle *thread) override |
void | threadNotYetStopped (folly::ThreadPoolExecutor::ThreadHandle *thread) override |
Public Member Functions inherited from folly::ThreadPoolExecutor::Observer | |
virtual | ~Observer ()=default |
Private Types | |
using | WorkerMap = std::map< folly::ThreadPoolExecutor::ThreadHandle *, std::shared_ptr< Acceptor >> |
using | Mutex = folly::SharedMutexReadPriority |
Private Attributes | |
std::shared_ptr< WorkerMap > | workers_ |
std::shared_ptr< Mutex > | workersMutex_ |
std::shared_ptr< AcceptorFactory > | acceptorFactory_ |
folly::IOThreadPoolExecutor * | exec_ {nullptr} |
std::shared_ptr< std::vector< std::shared_ptr< folly::AsyncSocketBase > > > | sockets_ |
std::shared_ptr< ServerSocketFactory > | socketFactory_ |
Definition at line 273 of file ServerBootstrap-inl.h.
|
private |
Definition at line 306 of file ServerBootstrap-inl.h.
|
private |
Definition at line 305 of file ServerBootstrap-inl.h.
|
inlineexplicit |
Definition at line 275 of file ServerBootstrap-inl.h.
References f.
void wangle::ServerWorkerPool::forEachWorker | ( | F && | f | ) | const |
Definition at line 318 of file ServerBootstrap-inl.h.
References f.
|
inlineoverridevirtual |
Reimplemented from folly::ThreadPoolExecutor::Observer.
Definition at line 298 of file ServerBootstrap-inl.h.
References map().
|
inlineoverridevirtual |
Reimplemented from folly::ThreadPoolExecutor::Observer.
Definition at line 294 of file ServerBootstrap-inl.h.
|
overridevirtual |
Implements folly::ThreadPoolExecutor::Observer.
Definition at line 24 of file ServerBootstrap.cpp.
References acceptorFactory_, exec_, folly::IOThreadPoolExecutor::getEventBase(), h, folly::netops::socket(), socketFactory_, sockets_, workers_, and workersMutex_.
|
overridevirtual |
Implements folly::ThreadPoolExecutor::Observer.
Definition at line 41 of file ServerBootstrap.cpp.
References folly::gen::move, folly::netops::socket(), socketFactory_, sockets_, workers_, and workersMutex_.
|
private |
Definition at line 310 of file ServerBootstrap-inl.h.
Referenced by threadStarted().
|
private |
Definition at line 311 of file ServerBootstrap-inl.h.
Referenced by threadStarted().
|
private |
Definition at line 314 of file ServerBootstrap-inl.h.
Referenced by threadStarted(), and threadStopped().
|
private |
Definition at line 313 of file ServerBootstrap-inl.h.
Referenced by threadStarted(), and threadStopped().
|
private |
Definition at line 308 of file ServerBootstrap-inl.h.
Referenced by threadStarted(), and threadStopped().
|
private |
Definition at line 309 of file ServerBootstrap-inl.h.
Referenced by threadStarted(), and threadStopped().