Set shut down flag after acquiring the mutex, not before
As this flag is tested in the worker thread only when it owns the mutex, set it only after acquiring the mutex too to avoid any possibility of a data race.
This commit is contained in:
@@ -356,8 +356,8 @@ wxWebSessionCURL::~wxWebSessionCURL()
|
||||
{
|
||||
{
|
||||
// Notify the work thread
|
||||
m_shuttingDown = true;
|
||||
wxMutexLocker lock(m_mutex);
|
||||
m_shuttingDown = true;
|
||||
m_condition.Signal();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user