OpenDaVINCI  4.15.3
odcore::wrapper::ConcurrencyFactoryWorker< product > Class Template Reference

#include <ConcurrencyFactoryWorker.h>

Static Public Member Functions

static ThreadcreateThread (Runnable &runnable)
 
static void usleepFor (const long &microseconds)
 
static void usleepUntil (const long &seconds, const long &partialMicroseconds)
 

Detailed Description

template<SystemLibraryProducts product>
class odcore::wrapper::ConcurrencyFactoryWorker< product >

This template class provides factory methods to the ConcurrencyFactory. The factory methods' implementations for different products have to be defined in specializations of the ConcurrencyFactoryWorker template class.

ConcurrencyFactory, ConcurrencyFactoryWorker, SystemLibraryProducts, WIN32ConcurrencyFactoryWorker, POSIXConcurrencyFactoryWorker

Member Function Documentation

template<SystemLibraryProducts product>
static Thread* odcore::wrapper::ConcurrencyFactoryWorker< product >::createThread ( Runnable runnable)
static

This method creates a new thread for a given Runnable object

Parameters
runnableThe Runnable that should be threadified.
Returns
Thread based on the type of instance this factory is.

Referenced by odcore::wrapper::ConcurrencyFactory::createThread().

template<SystemLibraryProducts product>
static void odcore::wrapper::ConcurrencyFactoryWorker< product >::usleepFor ( const long &  microseconds)
static

This method causes the calling to sleep for the specified amount of time.

Parameters
microsecondsTime to sleep in ms.

Referenced by odcore::wrapper::ConcurrencyFactory::usleepFor().

template<SystemLibraryProducts product>
static void odcore::wrapper::ConcurrencyFactoryWorker< product >::usleepUntil ( const long &  seconds,
const long &  partialMicroseconds 
)
static

This methods sleeps until the specified TimeStamp or returns immediately if the specified time is in the past.

Parameters
secondsTime point in seconds until which the execution of the current thread is suspended.
partialMicrosecondsPartial microseconds.

Referenced by odcore::wrapper::ConcurrencyFactory::usleepUntil().