[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Overriding OnAssertFailure()

From: Greg Chicares
Subject: [lmi] Overriding OnAssertFailure()
Date: Sun, 26 Oct 2014 01:23:03 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

I finally took your suggestion here:

| so you may want to override wxApp::OnAssertFailure().

Committed 20141026T0104Z, revision 5998. [As the comments in the
changed code explain, I think this will prevent user confusion.]

But I'm confused about ShowAssertDialog() in src/common/appbase.cpp :

   1369 #if wxUSE_THREADS
   1370     // if we are not in the main thread, output the assert directly and 
   1371     // since dialogs cannot be displayed
   1372     if ( !wxThread::IsMain() )
   1373     {
   1374         msg += wxString::Format(" [in thread %lx]", 
   1375     }
   1376 #endif // wxUSE_THREADS

The code seems merely to append some string data. But the comment seems
to suggest that the subsequent call to [Do]ShowAssertDialog() would be
blocked, yet that doesn't seem to be the case. What am I missing?

I ask because, even though lmi currently does not use threads, I don't
want my OnAssertFailure() override to make it thread-unsafe.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]