CyberEngineMkIII
Home
Contexts
Conventions
Classes
Files
Todo
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
Engine
Platform
System
CYBThread.hpp
Go to the documentation of this file.
1
#pragma once
3
namespace
CYB {
4
namespace
Platform {
5
namespace
System {
7
class
Thread
:
private
Implementation::Thread
{
8
friend
class
Implementation::Thread
;
//Allow it to call back into RunThread
9
public
:
11
enum class
State
{
12
IDLE
,
13
RUNNING
,
14
FINISHED
,
15
};
16
private
:
17
bool
FCancelSubmitted
;
18
private
:
25
static
void
RunThread
(
API::Threadable
& AThreadable) noexcept;
26
public
:
33
static
void
Sleep
(
const
unsigned
int
AMilliseconds) noexcept;
39
static
void
Yield
(
void
) noexcept;
47
Thread
(API::
Threadable
& AThreadable);
49
Thread
(const
Thread
&) = delete;
51
~
Thread
();
52
59
void
Cancel
(
void
);
66
bool
IsFinished
(
void
) const noexcept;
72
void
Wait
(
void
) const noexcept;
73
};
74
};
75
};
76
};
CYB::Platform::System::Thread::State::FINISHED
The thread has finished running.
CYB::Platform::System::Thread::State::RUNNING
The thread is running.
CYB::Platform::System::Thread::State::IDLE
The thread is not running and can be started.
CYB::Platform::System::Thread::FCancelSubmitted
bool FCancelSubmitted
A check to make sure FThreadable.CancelThreadedOperation is not called more than once.
Definition:
CYBThread.hpp:17
CYB::Platform::System::Implementation::Thread
Contains the thread handle and startup function.
Definition:
CYBWin32Thread.hpp:8
CYB::Platform::System::Thread
Definition of a platform thread object.
Definition:
CYBThread.hpp:7
CYB::Platform::System::Thread::State
State
The states of a thread.
Definition:
CYBThread.hpp:11
CYB::Platform::System::Thread::RunThread
static void RunThread(API::Threadable &AThreadable) noexcept
Properly traps and logs exceptions generated by threads. And runs AThreadable.
Definition:
CYBThread.cpp:4
CYB::Platform::System::Thread::IsFinished
bool IsFinished(void) const noexcept
Check whether or not the owned thread is terminated.
Definition:
CYBWin32Thread.cpp:19
CYB::API::Threadable
The basic multithreading interface.
Definition:
Threadable.hpp:6
CYB::Platform::System::Thread::Cancel
void Cancel(void)
Cancel a thread. Calls CancelThreadedOperation on the assigned Threadable in the current thread if Is...
Definition:
CYBThread.cpp:35
CYB::Platform::System::Thread::Sleep
static void Sleep(const unsigned int AMilliseconds) noexcept
Put the thread to sleep for at least AMilliseconds.
Definition:
CYBWin32Thread.cpp:28
CYB::Platform::System::Thread::Wait
void Wait(void) const noexcept
Blocks current thread until the owned thread has terminated.
Definition:
CYBWin32Thread.cpp:24
CYB::Platform::System::Thread::Yield
static void Yield(void) noexcept
Expires the current threads processor time and sumbits it to the OS for rescheduling.
Definition:
CYBWin32Thread.cpp:32
Generated by
1.8.6