Explain reason for invalidating gs_tlsThisThread better

Just improve a comment, no real changes.
This commit is contained in:
Vadim Zeitlin
2021-04-16 22:30:09 +01:00
parent c1cc71066f
commit e3691dbc13

View File

@@ -1266,8 +1266,9 @@ void wxThreadModule::OnExit()
wxLogLastError(wxT("TlsFree failed."));
}
// invalidate slot index to prevent wxThread from trying to reuse it if the
// library is initialized again later
// invalidate slot index to make the errors more obvious if we try to use
// it from now on, e.g. if any wxThreads are still running (which shouldn't
// be the case, of course, but might still happen)
gs_tlsThisThread = TLS_OUT_OF_INDEXES;
if ( gs_critsectGui )