NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
the tread pool handles the dynamic scheduling of tasks during Runtime @Limitations More...
#include <ThreadPool.hpp>
Public Member Functions | |
ThreadPool (WorkerId nodeId, QueryManagerPtr queryManager, uint32_t numThreads, std::vector< BufferManagerPtr > bufferManagers, uint64_t numberOfBuffersPerWorker, HardwareManagerPtr hardwareManager, std::vector< uint64_t > workerPinningPositionList) | |
default constructor More... | |
~ThreadPool () | |
default destructor More... | |
bool | stop () |
stop the Thread pool 1.) check if thread pool is already running, More... | |
bool | isRunning () const |
bool | start (const std::vector< uint64_t > threadToQueueMapping={}) |
start the Thread pool 1.) check if thread pool is already running, More... | |
void | runningRoutine (WorkerContext &&workerContext) |
running routine of threads, in this routine, threads repeatedly execute the following steps 1.) Check if running is still true 2.) If yes, request work from query manager (blocking until tasks get available) 3.) If task is valid, execute the task and completeWork 4.) Repeat More... | |
uint32_t | getNumberOfThreads () const |
get the current number of threads in thread pool More... | |
the tread pool handles the dynamic scheduling of tasks during Runtime @Limitations
|
explicit |
default constructor
nodeId | the id of this node |
queryManager | |
number | of threads to use |
sourcePinningPositionList,a | list of where to pin the |
NES::Runtime::ThreadPool::~ThreadPool | ( | ) |
uint32_t NES::Runtime::ThreadPool::getNumberOfThreads | ( | ) | const |
get the current number of threads in thread pool
|
inline |
void NES::Runtime::ThreadPool::runningRoutine | ( | WorkerContext && | workerContext | ) |
running routine of threads, in this routine, threads repeatedly execute the following steps 1.) Check if running is still true 2.) If yes, request work from query manager (blocking until tasks get available) 3.) If task is valid, execute the task and completeWork 4.) Repeat
References NES::AllFinished, NES::Error, NES::Finished, NES::TaskExecutionException::getExecutable(), NES_ASSERT, NES_DEBUG, NES_ERROR, NES_THROW_RUNTIME_ERROR, NES::Ok, and NES::Exceptions::RuntimeException::what().
Referenced by start().
bool NES::Runtime::ThreadPool::start | ( | const std::vector< uint64_t > | threadToQueueMapping = {} | ) |
start the Thread pool 1.) check if thread pool is already running,
References NES::Runtime::NesThread::getId(), NES_ASSERT, NES_DEBUG, NES_ERROR, NES_WARNING, runningRoutine(), and NES::setThreadName().
bool NES::Runtime::ThreadPool::stop | ( | ) |
stop the Thread pool 1.) check if thread pool is already running,
References NES_DEBUG.
Referenced by ~ThreadPool().