![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <WorkStealingThreadPool.h>
Public Member Functions | |
| template<typename TaskT> | |
| auto | executeAsync (TaskT &&task, int idx=-1) -> std::future< decltype(task(std::declval< CONTEXT >()))> |
| void | waitAll () |
| WorkStealingThreadPool (const bool workSteal, const std::vector< CONTEXT > &context) | |
| ~WorkStealingThreadPool () | |
Private Member Functions | |
| void | run (size_t queueIndex, const CONTEXT &context) |
| void | workStealRun (size_t queueIndex, const CONTEXT &context) |
Private Attributes | |
| std::atomic< size_t > | myQueueIndex { 0 } |
| std::vector< TaskQueue< CONTEXT > > | myQueues |
| std::vector< std::thread > | myThreads |
| const size_t | myTryoutCount |
Definition at line 30 of file WorkStealingThreadPool.h.
|
inlineexplicit |
Definition at line 33 of file WorkStealingThreadPool.h.
References myQueues, myThreads, myTryoutCount, run(), and workStealRun().
|
inline |
Definition at line 46 of file WorkStealingThreadPool.h.
|
inline |
Definition at line 56 of file WorkStealingThreadPool.h.
References myQueueIndex, myQueues, myTryoutCount, and n.
Referenced by waitAll().
|
inlineprivate |
Definition at line 86 of file WorkStealingThreadPool.h.
References myQueues.
Referenced by WorkStealingThreadPool().
|
inline |
Definition at line 75 of file WorkStealingThreadPool.h.
References executeAsync(), myQueues, and n.
|
inlineprivate |
Definition at line 95 of file WorkStealingThreadPool.h.
References myQueues, myTryoutCount, and n.
Referenced by WorkStealingThreadPool().
|
private |
Definition at line 112 of file WorkStealingThreadPool.h.
Referenced by executeAsync().
|
private |
Definition at line 111 of file WorkStealingThreadPool.h.
Referenced by executeAsync(), run(), waitAll(), WorkStealingThreadPool(), workStealRun(), and ~WorkStealingThreadPool().
|
private |
Definition at line 114 of file WorkStealingThreadPool.h.
Referenced by WorkStealingThreadPool(), and ~WorkStealingThreadPool().
|
private |
Definition at line 113 of file WorkStealingThreadPool.h.
Referenced by executeAsync(), WorkStealingThreadPool(), and workStealRun().