![]() |
GM6000 Digital Heater Controller Build: 20 (Branch = develop)
SDX-1330
|
This concrete class implements a Thread object using Win32 threads NOTE: The class/implementation uses _beginthread() instead of CreateThread() ->this is per Microsoft's documentation that says the _beginthread() properly initializes/cleans-up the C-Runtime library as where CreateThread() does NOT. More...
This concrete class implements a Thread object using Win32 threads NOTE: The class/implementation uses _beginthread() instead of CreateThread() ->this is per Microsoft's documentation that says the _beginthread() properly initializes/cleans-up the C-Runtime library as where CreateThread() does NOT.
#include <Thread.h>
Public Member Functions | |
| Thread (Runnable &runnable, const char *name, int priority=CPL_SYSTEM_THREAD_PRIORITY_NORMAL, unsigned stackSize=0, 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) | |
| COMPONENT Scoped constructor to convert the native Win32 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. | |
| HANDLE | m_threadHandle |
| internal handle | |
| int | m_priority |
| Priority. | |
| bool | m_allowSimTicks |
| Option to allow simulate ticks. | |
| Cpl::System::Semaphore | m_syncSema |
| The thread synchronized message semaphore. | |
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::Win32::Thread::Thread | ( | Runnable & | runnable, |
| const char * | name, | ||
| int | priority = CPL_SYSTEM_THREAD_PRIORITY_NORMAL, | ||
| unsigned | stackSize = 0, | ||
| bool | allowSimTicks = true ) |
Constructor.
Priority is 0=highest, 30=lowest, normal=15. NOTE: Does NOT support the application supplying the stack memory.
|
virtual |
Destructor.
Reimplemented from Cpl::System::Thread.
| Cpl::System::Win32::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 |
Priority.
|
protected |
Reference to the runnable object for the thread.
|
protected |
The thread synchronized message semaphore.
|
protected |
internal handle
|
protected |
Thread ID.