![]() |
GM6000 Digital Heater Controller Build: 20 (Branch = develop)
SDX-1330
|
This concrete class implements a Thread object using C++11 threads. More...
This concrete class implements a Thread object using C++11 threads.
#include <Thread.h>
Public Member Functions | |
| Thread (Runnable &runnable, const char *name, bool allowSimTicks=true) | |
| Constructor. | |
| ~Thread () | |
| Destructor. | |
| const char * | getName () noexcept |
| See Cpl::System::Thread. | |
| size_t | getId () noexcept |
| See Cpl::System::Thread. | |
| bool | isRunning (void) noexcept |
| See Cpl::System::Thread. | |
| Cpl_System_Thread_NativeHdl_T | getNativeHandle (void) noexcept |
| See Cpl::System::Thread. | |
| Runnable & | getRunnable (void) noexcept |
| See Cpl::System::Thread. | |
| int | signal (void) noexcept |
| See Cpl::System::Signable. | |
| int | su_signal (void) noexcept |
| See Cpl::System::Signable. | |
| Thread (Cpl::System::Runnable &dummyRunnable) | |
| Private constructor to convert the native C++11 thread to a Cpl Thread. | |
Public Member Functions inherited from Cpl::System::Signable | |
| virtual | ~Signable () |
| Virtual destructor. | |
Public Member Functions inherited from Cpl::Container::Item | |
| bool | insert_ (void *newContainerPtr) |
| Helper method to trap when inserting an item in multiple containers. | |
| bool | isInContainer_ (const void *containerPtr) const noexcept |
| Returns 'true' if the instance is in the specified container. | |
Protected Attributes | |
| Cpl::System::Runnable & | m_runnable |
| Reference to the runnable object for the thread. | |
| Cpl::Text::FString< 64 > | m_name |
| ASCII name of the task. | |
| size_t | m_threadID |
| Thread ID. | |
| bool | m_allowSimTicks |
| Option to allow simulate ticks. | |
| Cpl::System::Semaphore | m_syncSema |
| The thread synchronized message semaphore. | |
| std::thread | m_thread |
| C++11 thread object. | |
Friends | |
| class | Cpl::System::Thread |
| Housekeeping. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Cpl::System::Thread | |
| static Thread & | getCurrent () noexcept |
| This method returns a reference to the currently executing thread. | |
| static Thread * | tryGetCurrent () noexcept |
| Special version of getCurrent(). | |
| static void | wait () noexcept |
| This method causes the CURRENT thread to wait until its 'thread semaphore' is signal/set. | |
| static bool | tryWait () noexcept |
| This method is similar to Semaphore::tryWait(), except that it operates on the thread semaphore. | |
| static bool | timedWait (unsigned long timeoutInMsec) noexcept |
| Same as wait(), except the call will return after 'timeoutInMsec' has expired without the thread being signaled. | |
| static const char * | myName () noexcept |
| Returns the name for the current thread (i.e. | |
| static size_t | myId () noexcept |
| Returns the ID for the current thread (i.e. | |
| static Runnable & | myRunnable () noexcept |
| This method returns a reference to the current thread' runnable instance. | |
| static void | traverse (Thread::Traverser &client) noexcept |
| Internal Iterator that allows the Client to traverse the list active threads. | |
| static Thread * | create (Runnable &runnable, const char *name, int priority=CPL_SYSTEM_THREAD_PRIORITY_NORMAL, int stackSize=0, void *stackPtr=0, bool allowSimTicks=true) |
| This method creates a thread according to the specified parameters. | |
| static void | destroy (Thread &threadToDestroy) |
| This method is used to destroy a thread that was created by the Thread Factory. | |
Static Public Member Functions inherited from Cpl::Container::Item | |
| static void | remove_ (Item *itemPtr) noexcept |
| Helper method to do the proper 'clean-up' for the multiple-containers-error-trap when removing an item from a container. | |
Public Attributes inherited from Cpl::Container::Item | |
| void * | m_nextPtr_ |
| The link field. | |
| void * | m_inListPtr_ |
| Debug field. | |
Protected Member Functions inherited from Cpl::Container::Item | |
| Item () | |
| Constructor. | |
| Item (const char *) | |
| Constructor used ONLY with the child class MapItem: -->special constructor to allow a Map to be statically allocated. | |
| Cpl::System::Cpp11::Thread::Thread | ( | Runnable & | runnable, |
| const char * | name, | ||
| bool | allowSimTicks = true ) |
Constructor.
NOTE: Does NOT support the following:
o Assigning a thread priority o Specifying the size of the thread stack o Providing the stack memory
|
virtual |
Destructor.
Reimplemented from Cpl::System::Thread.
| Cpl::System::Cpp11::Thread::Thread | ( | Cpl::System::Runnable & | dummyRunnable | ) |
|
virtualnoexcept |
See Cpl::System::Thread.
Implements Cpl::System::Thread.
|
virtualnoexcept |
See Cpl::System::Thread.
Implements Cpl::System::Thread.
|
virtualnoexcept |
See Cpl::System::Thread.
Implements Cpl::System::Thread.
|
virtualnoexcept |
See Cpl::System::Thread.
Implements Cpl::System::Thread.
|
virtualnoexcept |
See Cpl::System::Thread.
Implements Cpl::System::Thread.
|
virtualnoexcept |
Implements Cpl::System::Signable.
|
virtualnoexcept |
Implements Cpl::System::Signable.
|
friend |
Housekeeping.
|
protected |
Option to allow simulate ticks.
|
protected |
ASCII name of the task.
|
protected |
Reference to the runnable object for the thread.
|
protected |
The thread synchronized message semaphore.
|
protected |
C++11 thread object.
|
protected |
Thread ID.