|
OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
This allocates a thread pool used to listen on a shared job queue. More...
#include <ossimJobMultiThreadQueue.h>
Public Types | |
| typedef std::vector< std::shared_ptr< ossimJobThreadQueue > > | ThreadQueueList |
Public Member Functions | |
| ossimJobMultiThreadQueue (std::shared_ptr< ossimJobQueue > q=0, ossim_uint32 nThreads=0) | |
| allows one to create a pool of threads with a shared job queue More... | |
| virtual | ~ossimJobMultiThreadQueue () |
| Will cancel all threads and wait for completion and clear the thread queue list. More... | |
| std::shared_ptr< ossimJobQueue > | getJobQueue () |
| const std::shared_ptr< ossimJobQueue > | getJobQueue () const |
| void | setJobQueue (std::shared_ptr< ossimJobQueue > q) |
| set the job queue to all threads More... | |
| void | setNumberOfThreads (ossim_uint32 nThreads) |
| Will set the number of threads. More... | |
| ossim_uint32 | getNumberOfThreads () const |
| ossim_uint32 | numberOfBusyThreads () const |
| bool | areAllThreadsBusy () const |
| bool | hasJobsToProcess () const |
| void | cancel () |
| Allows one to cancel all threads. More... | |
| void | waitForCompletion () |
| Allows on to wait for all thread completions. More... | |
Protected Attributes | |
| std::mutex | m_mutex |
| std::shared_ptr< ossimJobQueue > | m_jobQueue |
| ThreadQueueList | m_threadQueueList |
This allocates a thread pool used to listen on a shared job queue.
Definition at line 69 of file ossimJobMultiThreadQueue.h.
| typedef std::vector<std::shared_ptr<ossimJobThreadQueue> > ossimJobMultiThreadQueue::ThreadQueueList |
Definition at line 72 of file ossimJobMultiThreadQueue.h.
| ossimJobMultiThreadQueue::ossimJobMultiThreadQueue | ( | std::shared_ptr< ossimJobQueue > | q = 0, |
| ossim_uint32 | nThreads = 0 |
||
| ) |
allows one to create a pool of threads with a shared job queue
Definition at line 3 of file ossimJobMultiThreadQueue.cpp.
References setNumberOfThreads().
|
virtual |
Will cancel all threads and wait for completion and clear the thread queue list.
Definition at line 10 of file ossimJobMultiThreadQueue.cpp.
References cancel(), m_threadQueueList, and waitForCompletion().
| bool ossimJobMultiThreadQueue::areAllThreadsBusy | ( | ) | const |
Definition at line 82 of file ossimJobMultiThreadQueue.cpp.
References m_mutex, and m_threadQueueList.
| void ossimJobMultiThreadQueue::cancel | ( | ) |
Allows one to cancel all threads.
Definition at line 111 of file ossimJobMultiThreadQueue.cpp.
References m_threadQueueList.
Referenced by ~ossimJobMultiThreadQueue().
| std::shared_ptr< ossimJobQueue > ossimJobMultiThreadQueue::getJobQueue | ( | ) |
Definition at line 17 of file ossimJobMultiThreadQueue.cpp.
References m_jobQueue, and m_mutex.
| const std::shared_ptr< ossimJobQueue > ossimJobMultiThreadQueue::getJobQueue | ( | ) | const |
Definition at line 22 of file ossimJobMultiThreadQueue.cpp.
References m_jobQueue, and m_mutex.
| ossim_uint32 ossimJobMultiThreadQueue::getNumberOfThreads | ( | ) | const |
Definition at line 63 of file ossimJobMultiThreadQueue.cpp.
References m_mutex, and m_threadQueueList.
| bool ossimJobMultiThreadQueue::hasJobsToProcess | ( | ) | const |
Definition at line 95 of file ossimJobMultiThreadQueue.cpp.
References m_mutex, and m_threadQueueList.
| ossim_uint32 ossimJobMultiThreadQueue::numberOfBusyThreads | ( | ) | const |
Definition at line 69 of file ossimJobMultiThreadQueue.cpp.
References m_mutex, and m_threadQueueList.
| void ossimJobMultiThreadQueue::setJobQueue | ( | std::shared_ptr< ossimJobQueue > | q | ) |
set the job queue to all threads
| q | the job queue to set |
Definition at line 27 of file ossimJobMultiThreadQueue.cpp.
References m_jobQueue, m_mutex, and m_threadQueueList.
| void ossimJobMultiThreadQueue::setNumberOfThreads | ( | ossim_uint32 | nThreads | ) |
Will set the number of threads.
Definition at line 37 of file ossimJobMultiThreadQueue.cpp.
References m_jobQueue, m_mutex, and m_threadQueueList.
Referenced by ossimJobMultiThreadQueue().
| void ossimJobMultiThreadQueue::waitForCompletion | ( | ) |
Allows on to wait for all thread completions.
Usually called after
Definition at line 119 of file ossimJobMultiThreadQueue.cpp.
References m_threadQueueList.
Referenced by ~ossimJobMultiThreadQueue().
|
protected |
Definition at line 140 of file ossimJobMultiThreadQueue.h.
Referenced by getJobQueue(), setJobQueue(), and setNumberOfThreads().
|
mutableprotected |
Definition at line 139 of file ossimJobMultiThreadQueue.h.
Referenced by areAllThreadsBusy(), getJobQueue(), getNumberOfThreads(), hasJobsToProcess(), numberOfBusyThreads(), setJobQueue(), and setNumberOfThreads().
|
protected |
Definition at line 141 of file ossimJobMultiThreadQueue.h.
Referenced by areAllThreadsBusy(), cancel(), getNumberOfThreads(), hasJobsToProcess(), numberOfBusyThreads(), setJobQueue(), setNumberOfThreads(), waitForCompletion(), and ~ossimJobMultiThreadQueue().
1.8.14