7 const auto ThreadID(
Core().ThreadID());
8 API::Assert::LessThan(1ULL, ThreadID);
10 Engine::Context::GetContext().FLogger.Log(
API::String::Static(u8
"Thread started."), API::Logger::Level::DEV);
12 AThreadable.BeginThreadedOperation();
14 Engine::Context::GetContext().FLogger.Log(
API::String::Static(u8
"Thread finished."), API::Logger::Level::DEV);
17 auto&
Logger(Engine::Context::GetContext().FLogger);
22 Engine::Context::GetContext().FLogger.Log(
API::String::Static(u8
"Unhandled unknown exception crashed this thread with no survivors."), API::Logger::Level::ERR);
27 Implementation::
Thread(AThreadable),
28 FCancelSubmitted(false)
36 if (!FCancelSubmitted && !IsFinished()) {
37 FCancelSubmitted =
true;
38 FThreadable.CancelThreadedOperation();
API::String::Static FMessage
An english description of the error, guaranteed to be compatible with CYB::API::String::UTF8.
virtual void Log(const String::CStyle &AMessage, const Level ALevel)=0
Log a message. Will be written to a text file on the Path returned by CurrentLog. ...
A string pointing to unchanging data in the stack above it or the data segment. Must have UTF-8 encod...
void DefaultContext(void) noexcept
Set the current Context to FEngineContext.
The basic multithreading interface.
Precompiled header for inter-engine operations.
Engine::Core & Core(void) noexcept
Retrieve the Core singleton.
The interface for writing safe logs.
The base exception recognized by the entire engine.