32 #if YCL_MULTITHREAD == 1
38 using namespace Drawing;
45 std::chrono::nanoseconds idle_sleep(
u64(1000000000 / g_max_free_fps));
88 pFontCache(), UIResponseLimit(0x40), Root()
90 YAssert(!YSLib::pApp,
"Duplicate instance found.");
95 p_hosted = make_unique<Host::Environment>();
104 throw LoggedEvent(
"Error occurred in creating font cache.");
107 const auto& node(Root[
"YFramework"]);
110 node,
"FontFile"), AccessChild<string>(node,
"FontDirectory"));
128 GUIApplication::GetHost()
130 YAssert(
bool(p_hosted),
"Null pointer found.");
139 using namespace Shells;
144 OnGotMessage(FetchIdleMessage());
147 std::this_thread::sleep_for(idle_sleep);
153 const auto i(Queue.GetBegin());
161 std::this_thread::sleep_for(idle_sleep);
164 OnGotMessage(i->second);
174 YAssert(pApp,
"Null pointer found.");
190 Host::FetchEnvironment().ExitOnAllWindowThreadCompleted =
true;
193 throw LoggedEvent(
"Failed launching the main shell;");