#include "wx/defs.h"
+#include "wx/thread.h"
+
// ----------------------------------------------------------------------------
// common constants for use in wxUSE_LOG/!wxUSE_LOG
// ----------------------------------------------------------------------------
// with the number of times it was repeated
static bool ms_bRepetCounting;
+ wxCRIT_SECT_DECLARE(ms_prevCS); // protects the ms_prev values below
static wxString ms_prevString; // previous message that was logged
static unsigned ms_prevCounter; // how many times it was repeated
static time_t ms_prevTimeStamp;// timestamp of the previous message
/* static */
void wxLog::LogLastRepetitionCountIfNeeded()
{
+ wxCRIT_SECT_LOCKER(lock, ms_prevCS);
+
wxLog *pLogger = GetActiveTarget();
if ( pLogger && ms_prevCounter )
{
{
if ( GetRepetitionCounting() )
{
+ wxCRIT_SECT_LOCKER(lock, ms_prevCS);
+
if ( szString == ms_prevString )
{
ms_prevCounter++;