|
Berserk
|
Represents thread wrapper used to enqueue commands to execute. More...
#include <Thread.hpp>
Public Types | |
| enum class | Flag { Before , Update , After } |
| Flag to enqueue callback. More... | |
| using | Callable = std::function< void()> |
| Thread callback function type. More... | |
Public Member Functions | |
| BRK_API | Thread ()=default |
| BRK_API | ~Thread () |
| BRK_API void | Enqueue (Callable callable, Flag flag) |
| BRK_API void | EnqueueBefore (Callable callable) |
| BRK_API void | EnqueueUpdate (Callable callable) |
| BRK_API void | EnqueueAfter (Callable callable) |
| BRK_API void | Update () |
| BRK_API void | ExecuteBefore () |
| BRK_API void | ExecuteUpdate () |
| BRK_API void | ExecuteAfter () |
| BRK_API bool | OnThread () const |
Represents thread wrapper used to enqueue commands to execute.
| TArgs | Args to call callbacks |
| using Thread::Callable = std::function<void()> |
Thread callback function type.
|
strong |
|
default |
| BRK_NS_BEGIN Thread::~Thread | ( | ) |
| void Thread::Enqueue | ( | Thread::Callable | callable, |
| Thread::Flag | flag | ||
| ) |
Enqueue command to execute on thread
Enqueue command to execute on thread after update
Enqueue command to execute on thread before update
Enqueue command to execute on thread in update
| void Thread::ExecuteAfter | ( | ) |
| void Thread::ExecuteBefore | ( | ) |
| void Thread::ExecuteUpdate | ( | ) |
| bool Thread::OnThread | ( | ) | const |
| void Thread::Update | ( | ) |