Fix FP_LOADER_THREAD resource leak
The mechanism of thread termination was changed in 61c2beea
and not done
correctly - the thread was not notified that it should terminate.
This commit is contained in:
parent
ffef8b6c56
commit
c7c172d368
|
@ -123,6 +123,15 @@ class FP_THREAD_IFACE
|
||||||
m_panel = aPanel;
|
m_panel = aPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the associated panel.
|
||||||
|
*/
|
||||||
|
FOOTPRINT_PREVIEW_PANEL* GetPanel()
|
||||||
|
{
|
||||||
|
MUTLOCK lock( m_lock );
|
||||||
|
return m_panel;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Post an event to the panel, if the panel still exists. Return whether
|
* Post an event to the panel, if the panel still exists. Return whether
|
||||||
* the event was posted.
|
* the event was posted.
|
||||||
|
@ -217,7 +226,7 @@ public:
|
||||||
|
|
||||||
virtual void* Entry() override
|
virtual void* Entry() override
|
||||||
{
|
{
|
||||||
while( !TestDestroy() )
|
while( m_iface->GetPanel() )
|
||||||
{
|
{
|
||||||
auto ent = m_iface->PopFromQueue();
|
auto ent = m_iface->PopFromQueue();
|
||||||
|
|
||||||
|
@ -227,7 +236,7 @@ public:
|
||||||
wxMilliSleep( 100 );
|
wxMilliSleep( 100 );
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue