|
| | EventLoopThreadPool (const InetAddress &listenAddress) |
| | Constructor Function. Create Specific ThreadPool.
|
| |
| virtual | ~EventLoopThreadPool () override=default |
| | Destructor Function.
|
| |
| EventLoop * | GetNextLoop () |
| | Get next thread EventLoop.
|
| |
| std::vector< EventLoop * > | GetAllLoops () |
| | Get all thread EventLoop.
|
| |
| const std::string & | Name () const |
| | Get ThreadPool Name.
|
| |
| void | ThreadFunc (Thread<> *thread) |
| | Thread Function.
|
| |
| void | Start (int initThreadSize=3, ThreadInitCallback cb=nullptr) |
| | Start Run this thread pool.
|
| |
| void | SetMode (PoolMode mode) |
| | Set Pool Run Mode.
|
| |
| void | SetThreadIdleTimeOut (int idleTime) |
| | Set Pool Threads idle time out.
|
| |
| void | Wait () |
| | Wait for all tasks executed finish in taskqueue.
|
| |
| void | Continue () |
| | Continue ThreadPool.
|
| |
| void | Suspend () |
| | Suspend ThreadPool.
|
| |
| void | SubmitThreadTask_LightWeight (uint32_t threadId, std::function< void(Params...)> func) |
| | Submit a task to specific thread.
|
| |
| void | SubmitThreadTask_LightWeight_ForEach (std::function< void(Params...)> func) |
| | Submit a task to all thread.
|
| |
| template<typename Func , typename... Args> |
| auto | SubmitPoolTask (Func &&func, Args &&... args) -> std::future< decltype(func(std::forward< Args >(args)...))> |
| | Submit a task to task queue, and wait for a idle thread to execute it.
|
| |
| void | Start (int initThreadSize=0.5 *std::thread::hardware_concurrency()) |
| | Start Run this thread pool.
|
| |
| const int | GetThreadsCount () const |
| | Get Threads Count. This function is just used for unit test, should not be used in engine.
|
| |
| const std::unordered_map< uint32_t, std::unique_ptr< Thread< Params... > > > & | GetThreads () const |
| | Get Threads. This function is just used for unit test, should not be used in engine.
|
| |
| const int | GetInitThreadSize () const |
| | GetInitThreadSize. This function is just used for unit test, should not be used in engine.
|
| |
| const int | GetIdleThreadSize () const |
| | GetIdleThreadSize. This function is just used for unit test, should not be used in engine.
|
| |
| const int | GetTasks () const |
| | Get TaskQueue Count. This function is just used for unit test, should not be used in engine.
|
| |
| const PoolMode & | GetPoolMode () const |
| | GetPoolMode. This function is just used for unit test, should not be used in engine.
|
| |
| const int | GetThreadIdleTimeOut () const |
| | ThreadIdleTimeOut. This function is just used for unit test, should not be used in engine.
|
| |
| const bool | IsPoolRunning () const |
| | GetIsPoolRunning. This function is just used for unit test, should not be used in engine.
|
| |
ThreadPool of Multiple threading EventLoop.
Definition at line 19 of file EventLoopThreadPool.h.