mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 18:18:18 +00:00
sql_score init is threaded now
This commit is contained in:
parent
f6be7e20fb
commit
783c2161f1
|
@ -21,7 +21,7 @@ CSqlServer::CSqlServer(const char* pDatabase, const char* pPrefix, const char* p
|
||||||
m_pConnection = 0;
|
m_pConnection = 0;
|
||||||
m_pResults = 0;
|
m_pResults = 0;
|
||||||
m_pStatement = 0;
|
m_pStatement = 0;
|
||||||
|
|
||||||
m_SqlLock = lock_create();
|
m_SqlLock = lock_create();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,8 @@ m_pServer(pGameServer->Server())
|
||||||
CSqlData::ms_pPlayerData = PlayerData(0);
|
CSqlData::ms_pPlayerData = PlayerData(0);
|
||||||
CSqlData::ms_pMap = m_aMap;
|
CSqlData::ms_pMap = m_aMap;
|
||||||
|
|
||||||
ExecSqlFunc(new CSqlExecData(Init, new CSqlData()));
|
void* InitThread = thread_init(ExecSqlFunc, new CSqlExecData(Init, new CSqlData()));
|
||||||
|
thread_detach(InitThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSqlScore::ExecSqlFunc(void *pUser)
|
void CSqlScore::ExecSqlFunc(void *pUser)
|
||||||
|
|
Loading…
Reference in a new issue