FARGOS/VISTA Object Management Environment Core
..
|
Implements thread queues with multiple levels of priority. More...
#include <OMEexecQueue.h>
Public Member Functions | |
OMEthreadExecQueue () | |
~OMEthreadExecQueue () | |
OME_FAST_CALL void | addThreadToQueue (OMEthread *t, int prio=OME_DEFAULT_THREAD_PRIORITY) |
OME_FAST_CALL bool | removeSpecificThreadFromQueue (OMEthread *t, int prio=-1) |
OME_FAST_CALL uint_fast16_t | getNextThreads (OMEthread *v[], const uint_fast16_t maxWanted, uint_fast8_t *prio=nullptr, bool restartAtTop=true) |
OME_FAST_CALL int | terminateThreadsOnObject (const OMEobject *obj) |
OME_FAST_CALL uint_fast32_t | executeSlices (const uint_fast32_t maxCount) |
OME_FAST_CALL uint_fast32_t | parallelExecuteSlices (const uint_fast32_t maxCount) |
uint_fast32_t | totalQueuedAtLevel (uint_fast8_t l) const OME_ALWAYS_INLINE |
uint_fast32_t | totalQueued () const OME_ALWAYS_INLINE |
Private Member Functions | |
OME_FAST_CALL void | finishSlice (OMEthread *) |
Private Attributes | |
_STD deque< OMEthreadP > | threadList [OME_MAX_PRIORITY_LEVELS] |
uint_fast32_t | totalThreadsInQueue |
uint_fast8_t | lastLevel |
Implements thread queues with multiple levels of priority.
|
inline |
References lastLevel, and totalThreadsInQueue.
|
inline |
void OMEthreadExecQueue::addThreadToQueue | ( | OMEthread * | t, |
int | prio = OME_DEFAULT_THREAD_PRIORITY |
||
) |
uint_fast32_t OMEthreadExecQueue::executeSlices | ( | const uint_fast32_t | maxCount | ) |
|
inlineprivate |
References addThreadToQueue(), OMEthread::getThreadState(), OME_THREAD_RUNNING, and OME_THREAD_TERMINATED.
Referenced by executeSlices().
uint_fast16_t OMEthreadExecQueue::getNextThreads | ( | OMEthread * | v[], |
const uint_fast16_t | maxWanted, | ||
uint_fast8_t * | prio = nullptr , |
||
bool | restartAtTop = true |
||
) |
References l, OME_CRITICAL_SECTION_THREAD_QUEUE, OME_EXPECT_FALSE, OME_EXPECT_TRUE, OME_MAX_PRIORITY_LEVELS, OMEendCriticalSection(), OMEstartCriticalSection(), threadList, and totalThreadsInQueue.
Referenced by executeSlices().
uint_fast32_t OMEthreadExecQueue::parallelExecuteSlices | ( | const uint_fast32_t | maxCount | ) |
References totalThreadsInQueue.
bool OMEthreadExecQueue::removeSpecificThreadFromQueue | ( | OMEthread * | t, |
int | prio = -1 |
||
) |
int OMEthreadExecQueue::terminateThreadsOnObject | ( | const OMEobject * | obj | ) |
References _STD, OMEoid::getInstanceInMemory(), OMEthread::getThisOID(), l, LOG_CERR, LOG_ENDLINE, OME_CRITICAL_SECTION_THREAD_QUEUE, OME_EXPECT_FALSE, OME_EXPECT_TRUE, OME_MAX_PRIORITY_LEVELS, OMEendCriticalSection(), OMEstartCriticalSection(), OMEthread::outputOnStream(), OMEthread::terminateThread(), threadList, and totalThreadsInQueue.
|
inline |
References totalThreadsInQueue.
|
inline |
References l, and threadList.
|
private |
Referenced by executeSlices(), and OMEthreadExecQueue().
|
private |
|
private |
![]() | Generated: Fri Jul 31 2020 18:19:16
Support Information |