#include <threadManager.hpp>
template<typename TDatums, typename TWorker = std::shared_ptr<Worker<TDatums>>, typename TQueue = Queue<TDatums>>
class op::ThreadManager< TDatums, TWorker, TQueue >
Definition at line 16 of file threadManager.hpp.
◆ ThreadManager()
template<typename TDatums , typename TWorker , typename TQueue >
◆ ~ThreadManager()
template<typename TDatums , typename TWorker , typename TQueue >
◆ add() [1/2]
template<typename TDatums , typename TWorker , typename TQueue >
void op::ThreadManager< TDatums, TWorker, TQueue >::add |
( |
const unsigned long long |
threadId, |
|
|
const std::vector< TWorker > & |
tWorkers, |
|
|
const unsigned long long |
queueInId, |
|
|
const unsigned long long |
queueOutId |
|
) |
| |
◆ add() [2/2]
template<typename TDatums , typename TWorker , typename TQueue >
void op::ThreadManager< TDatums, TWorker, TQueue >::add |
( |
const unsigned long long |
threadId, |
|
|
const TWorker & |
tWorker, |
|
|
const unsigned long long |
queueInId, |
|
|
const unsigned long long |
queueOutId |
|
) |
| |
◆ exec()
template<typename TDatums , typename TWorker , typename TQueue >
◆ getIsRunningSharedPtr()
template<typename TDatums , typename TWorker = std::shared_ptr<Worker<TDatums>>, typename TQueue = Queue<TDatums>>
std::shared_ptr<std::atomic<bool> > op::ThreadManager< TDatums, TWorker, TQueue >::getIsRunningSharedPtr |
( |
| ) |
|
|
inline |
◆ isRunning()
template<typename TDatums , typename TWorker = std::shared_ptr<Worker<TDatums>>, typename TQueue = Queue<TDatums>>
◆ reset()
template<typename TDatums , typename TWorker , typename TQueue >
◆ setDefaultMaxSizeQueues()
template<typename TDatums , typename TWorker , typename TQueue >
void op::ThreadManager< TDatums, TWorker, TQueue >::setDefaultMaxSizeQueues |
( |
const long long |
defaultMaxSizeQueues = -1 | ) |
|
It sets the maximum number of elements in the queue. For maximum speed, set to a very large number, but the trade-off would be:
- Latency will hugely increase.
- The program might go out of RAM memory (so the computer might freeze). For minimum latency while keeping an optimal speed, set to -1, that will automatically detect the ideal number based on how many elements are connected to that queue.
- Parameters
-
defaultMaxSizeQueues | long long element with the maximum number of elements on the queue. |
Definition at line 121 of file threadManager.hpp.
◆ start()
template<typename TDatums , typename TWorker , typename TQueue >
◆ stop()
template<typename TDatums , typename TWorker , typename TQueue >
◆ tryEmplace()
template<typename TDatums , typename TWorker , typename TQueue >
◆ tryPop()
template<typename TDatums , typename TWorker , typename TQueue >
◆ tryPush()
template<typename TDatums , typename TWorker , typename TQueue >
bool op::ThreadManager< TDatums, TWorker, TQueue >::tryPush |
( |
const TDatums & |
tDatums | ) |
|
◆ waitAndEmplace()
template<typename TDatums , typename TWorker , typename TQueue >
bool op::ThreadManager< TDatums, TWorker, TQueue >::waitAndEmplace |
( |
TDatums & |
tDatums | ) |
|
◆ waitAndPop()
template<typename TDatums , typename TWorker , typename TQueue >
◆ waitAndPush()
template<typename TDatums , typename TWorker , typename TQueue >
bool op::ThreadManager< TDatums, TWorker, TQueue >::waitAndPush |
( |
const TDatums & |
tDatums | ) |
|
The documentation for this class was generated from the following file: