1. more wxDateTime work

2. some thread corrections (not fixing the deadlock with Delete() :-( )


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-12-01 22:15:53 +00:00
parent fa5f6926ec
commit fcc3d7cbad
7 changed files with 359 additions and 57 deletions

View File

@@ -24,9 +24,7 @@
#pragma implementation "thread.h"
#endif
// With simple makefiles, we must ignore the file body if not using
// threads.
#include "wx/setup.h"
#include "wx/defs.h"
#if wxUSE_THREADS
@@ -586,6 +584,9 @@ void wxThreadInternal::Wait()
if ( wxThread::IsMain() )
wxMutexGuiLeave();
wxLogTrace(TRACE_THREADS, _T("Starting to wait for thread %ld to exit."),
GetId());
// wait until the thread terminates (we're blocking in _another_ thread,
// of course)
m_condEnd.Wait();
@@ -622,6 +623,9 @@ void wxThreadInternal::SignalExit()
// wake up all the threads waiting for our termination - if there are any
if ( m_shouldBroadcast )
{
wxLogTrace(TRACE_THREADS, _T("Thread %ld signals end condition."),
GetId());
m_condEnd.Broadcast();
}
}
@@ -1243,8 +1247,9 @@ static void ScheduleThreadForDeletion()
gs_nThreadsBeingDeleted++;
wxLogTrace(TRACE_THREADS, _T("%u threads waiting to be deleted"),
gs_nThreadsBeingDeleted);
wxLogTrace(TRACE_THREADS, _T("%u thread%s waiting to be deleted"),
gs_nThreadsBeingDeleted,
gs_nThreadsBeingDeleted == 1 ? "" : "s");
}
static void DeleteThread(wxThread *This)