mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Replace SimpleThread by JThread now implementing same features
This commit is contained in:
parent
9772322613
commit
e9e9fd7c3f
9 changed files with 30 additions and 88 deletions
|
@ -177,7 +177,7 @@ void * MeshUpdateThread::Thread()
|
|||
|
||||
BEGIN_DEBUG_EXCEPTION_HANDLER
|
||||
|
||||
while(getRun())
|
||||
while(!StopRequested())
|
||||
{
|
||||
/*// Wait for output queue to flush.
|
||||
// Allow 2 in queue, this makes less frametime jitter.
|
||||
|
@ -302,9 +302,8 @@ Client::~Client()
|
|||
m_con.Disconnect();
|
||||
}
|
||||
|
||||
m_mesh_update_thread.setRun(false);
|
||||
while(m_mesh_update_thread.IsRunning())
|
||||
sleep_ms(100);
|
||||
m_mesh_update_thread.Stop();
|
||||
m_mesh_update_thread.Wait();
|
||||
while(!m_mesh_update_thread.m_queue_out.empty()) {
|
||||
MeshUpdateResult r = m_mesh_update_thread.m_queue_out.pop_front();
|
||||
delete r.mesh;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue