Main MRPT website > C++ reference for MRPT 1.5.6
Classes | Namespaces | Enumerations | Functions
threads.h File Reference
#include <mrpt/utils/core_defs.h>
Include dependency graph for threads.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mrpt::system::TThreadHandle
 This structure contains the information needed to interface the threads API on each platform: More...
 
class  mrpt::system::detail::ThreadCreateFunctor< T >
 
class  mrpt::system::detail::ThreadCreateFunctor< void * >
 
class  mrpt::system::detail::ThreadCreateFunctorNoParams
 
class  mrpt::system::detail::ThreadCreateObjectFunctor< CLASS, PARAM >
 
class  mrpt::system::detail::ThreadCreateObjectFunctorNoParams< CLASS >
 

Namespaces

 mrpt
 This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
 
 mrpt::system
 This namespace provides a OS-independent interface to many useful functions: filenames manipulation, time and date, string parsing, file I/O, threading, memory allocation, etc.
 
 mrpt::system::detail
 Auxiliary classes used internally to MRPT.
 

Enumerations

enum  mrpt::system::TProcessPriority { mrpt::system::ppIdle = 0, mrpt::system::ppNormal, mrpt::system::ppHigh, mrpt::system::ppVeryHigh }
 The type for cross-platform process (application) priorities. More...
 
enum  mrpt::system::TThreadPriority {
  mrpt::system::tpLowests =-15, mrpt::system::tpLower = -2, mrpt::system::tpLow = -1, mrpt::system::tpNormal = 0,
  mrpt::system::tpHigh = 1, mrpt::system::tpHigher = 2, mrpt::system::tpHighest = 15
}
 The type for cross-platform thread priorities. More...
 

Functions

TThreadHandle BASE_IMPEXP mrpt::system::detail::createThreadImpl (void(*func)(void *), void *param)
 
template<typename T >
TThreadHandle mrpt::system::createThread (void(*func)(T), T param)
 Creates a new thread from a function (or static method) with one generic parameter. More...
 
template<typename T >
TThreadHandle mrpt::system::createThreadRef (void(*func)(T &), T &param)
 
TThreadHandle mrpt::system::createThread (void(*func)(void))
 
template<typename CLASS , typename PARAM >
TThreadHandle mrpt::system::createThreadFromObjectMethod (CLASS *obj, void(CLASS::*func)(PARAM), PARAM param)
 Creates a new thread running a non-static method (so it will have access to "this") from another method of the same class - with one generic parameter. More...
 
template<typename CLASS , typename PARAM >
TThreadHandle mrpt::system::createThreadFromObjectMethodRef (CLASS *obj, void(CLASS::*func)(PARAM &), PARAM &param)
 
template<typename CLASS >
TThreadHandle mrpt::system::createThreadFromObjectMethod (CLASS *obj, void(CLASS::*func)(void))
 
void BASE_IMPEXP mrpt::system::joinThread (const TThreadHandle &threadHandle)
 Waits until the given thread ends. More...
 
unsigned long BASE_IMPEXP mrpt::system::getCurrentThreadId () MRPT_NO_THROWS
 Returns the ID of the current thread. More...
 
TThreadHandle BASE_IMPEXP mrpt::system::getCurrentThreadHandle () MRPT_NO_THROWS
 Returns a handle to the current thread. More...
 
void BASE_IMPEXP mrpt::system::exitThread () MRPT_NO_THROWS
 Explicit close of the current (running) thread. More...
 
void BASE_IMPEXP mrpt::system::getCurrentThreadTimes (time_t &creationTime, time_t &exitTime, double &cpuTime)
 Returns the creation and exit times of the current thread and its CPU time consumed. More...
 
void BASE_IMPEXP mrpt::system::changeThreadPriority (const TThreadHandle &threadHandle, TThreadPriority priority)
 Change the priority of the given thread - for Windows, see also changeCurrentProcessPriority() More...
 
void BASE_IMPEXP mrpt::system::terminateThread (TThreadHandle &threadHandle) MRPT_NO_THROWS
 Terminate a thread, giving it no choice to delete objects, etc (use only as a last resource) More...
 
void BASE_IMPEXP mrpt::system::changeCurrentProcessPriority (TProcessPriority priority)
 Change the priority of the given process (it applies to all the threads, plus independent modifiers for each thread). More...
 
unsigned int BASE_IMPEXP mrpt::system::getNumberOfProcessors ()
 Return the number of processors ("cores"), or 1 if it cannot be determined. More...
 
void BASE_IMPEXP mrpt::system::sleep (int time_ms) MRPT_NO_THROWS
 An OS-independent method for sending the current thread to "sleep" for a given period of time. More...
 
bool BASE_IMPEXP mrpt::system::launchProcess (const std::string &command)
 Executes the given command (which may contain a program + arguments), and waits until it finishes. More...
 



Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018