2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 13:44:56 +00:00

Fix TSan-reported race conditions

This commit is contained in:
Jack Andersen
2018-06-01 14:03:31 -10:00
parent 4062b2dfb7
commit 56a5cfd115
10 changed files with 146 additions and 127 deletions

View File

@@ -61,7 +61,7 @@ struct Application : boo::IApplicationCallback
hecl::CVarCommons m_cvarCommons;
std::unique_ptr<ViewManager> m_viewManager;
bool m_running = true;
std::atomic_bool m_running = {true};
Application() :
m_fileMgr(_S("urde")),
@@ -77,7 +77,7 @@ struct Application : boo::IApplicationCallback
{
initialize(app);
m_viewManager->init(app);
while (m_running)
while (m_running.load())
{
if (!m_viewManager->proc())
break;
@@ -90,7 +90,7 @@ struct Application : boo::IApplicationCallback
}
void appQuitting(boo::IApplication*)
{
m_running = false;
m_running.store(false);
}
void appFilesOpen(boo::IApplication*, const std::vector<boo::SystemString>& paths)
{