3#include <Utility/IUninstantiable.h>
4#include <Common/assertion.h>
13class Threads final :
private IUninstantiable
36 static void setMainThreadID(std::thread::id threadID);
39 static std::thread::id mainThreadID;
40 static std::thread::id renderThreadID;
50 PH_ASSERT(mainThreadID != std::thread::id{});
52 return std::this_thread::get_id() == mainThreadID;
60 PH_ASSERT(renderThreadID != std::thread::id{});
62 return std::this_thread::get_id() == renderThreadID;
70 PH_ASSERT(renderThreadID != std::thread::id{});
71 PH_ASSERT(renderThread);
Definition Application.h:27
Definition RenderThread.h:25
static bool isOnRenderThread()
Whether current thread is the rendering thread.
Definition Threads.h:55
static bool isOnMainThread()
Whether current thread is the thread that called main().
Definition Threads.h:47
static RenderThread & getRenderThread()
Get the rendering thread. It is an error to call this method when the application is not running.
Definition Threads.h:65
Definition ph_editor.h:10