Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
ConditionalWait.cpp
Go to the documentation of this file.
1
2
4
7
8namespace Divide {
9namespace {
11}
12
13void InitConditionalWait(PlatformContext& context) noexcept {
14 g_ctx = &context;
15}
16
18{
19 if (Runtime::isMainThread() && g_ctx != nullptr)
20 {
21 const U32 componentMask = g_ctx->componentMask();
23 // Mostly wait on threaded callbacks
24 g_ctx->idle(true, 0u, 0u);
25 g_ctx->componentMask( componentMask );
26 }
27}
28} //namespace Divide
void idle(bool fast=true, U64 deltaTimeUSGame=0u, U64 deltaTimeUSApp=0u)
bool isMainThread() noexcept
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
void PlatformContextIdleCall()
void InitConditionalWait(PlatformContext &context) noexcept
uint32_t U32
constexpr auto to_base(const Type value) -> Type