![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
Singleton class used to manage execution threads. More...
#include <ThreadManager.h>
Public Member Functions | |
| bool | isInit () const |
| retrieve object initialization flag | |
| void | init (ipUInt32 nbThreads) |
| initialize object with a given number of execution threads | |
| ipUInt32 | getNbThreads () const |
| retrieve number of threads associated to manager More... | |
| BoolResult | addProvider (const ActionProviderPtr &pActionProvider) |
| push a new action provider on back of providers collection (with respect to its priority) More... | |
| bool | restartProvider (const Guid &providerGuid) |
| method allowing to restart provider processing (provider is registred again to provider manager) More... | |
| bool | removeProvider (const Guid &providerGuid) |
| remove provider from providers collection More... | |
| ActionProviderPtr | getProvider (const Guid &providerGuid) const |
| retrieve provider from providers collection More... | |
| void | terminate () |
| terminate all threads and clear object data | |
| ProviderManagerPtr | getProviderManager () const |
| retrieve the provider manager | |
Static Public Member Functions | |
| static ThreadManager & | getInstance () |
| retrieve single instance of object | |
Protected Member Functions | |
| void | threadFunction (ipUInt32 threadIdx) |
| thread function used for actions execution | |
| void | notifyCompletion (const ActionProviderPtr &pActionProvider) |
| callback used for provider completion notification | |
| BoolResult | addProvider (const ActionProviderPtr &pActionProvider, bool bPushBack) |
| insert a new action provider into providers collection (with respect to its priority) More... | |
Constructors and destructors | |
| ThreadManager () | |
| ~ThreadManager () | |
Protected Attributes | |
| ProviderMap | _providerMap |
| global collection of execution providers ordered by guid | |
| ProviderManagerPtr | _pProviderManager |
| object used to manage provider execution priority | |
| ThreadColl | _threadColl |
| collection of threads associated to object | |
| bool volatile | _bTerminateRequested |
| flag indicating whether termination has been requested for threads | |
| boost::mutex | _mutex |
| mutex allowing to protect concurrent accesses to object | |
| bool | _bInit |
| object initialization flag | |
Friends | |
| class | processor::BaseAsyncProcessor |
Singleton class used to manage execution threads.
| ipUInt32 ipsdk::core::ThreadManager::getNbThreads | ( | ) | const |
retrieve number of threads associated to manager
| ipsdk::core::IPSDKCoreException | if isInit() == false |
| BoolResult ipsdk::core::ThreadManager::addProvider | ( | const ActionProviderPtr & | pActionProvider | ) |
push a new action provider on back of providers collection (with respect to its priority)
| ipsdk::core::IPSDKCoreException | if isInit() == false |
| ipsdk::core::IPSDKCoreException | if pActionProvider.get() == 0 |
| ipsdk::core::IPSDKCoreException | if pActionProvider->isInit() == false |
| bool ipsdk::core::ThreadManager::restartProvider | ( | const Guid & | providerGuid | ) |
method allowing to restart provider processing (provider is registred again to provider manager)
| ipsdk::core::IPSDKCoreException | if isInit() == false |
| bool ipsdk::core::ThreadManager::removeProvider | ( | const Guid & | providerGuid | ) |
remove provider from providers collection
| ipsdk::core::IPSDKCoreException | if isInit() == false |
| ActionProviderPtr ipsdk::core::ThreadManager::getProvider | ( | const Guid & | providerGuid | ) | const |
retrieve provider from providers collection
| ipsdk::core::IPSDKCoreException | if isInit() == false |
|
protected |
insert a new action provider into providers collection (with respect to its priority)
| ipsdk::core::IPSDKCoreException | if isInit() == false |
| ipsdk::core::IPSDKCoreException | if pActionProvider.get() == 0 |
| ipsdk::core::IPSDKCoreException | if pActionProvider->isInit() == false |
1.8.14