Made wxLogXXX() functions thread-safe.
They can now be called from any thread and will buffer the messages until the current log target is flushed from the main thread. This makes earlier code to do the same thing specifically for wxLogWindow unnecessary and also allows to use wxLogMessage() in the thread sample instead of using manual logging there. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -756,14 +756,22 @@ public:
|
||||
|
||||
/**
|
||||
Shows all the messages currently in buffer and clears it.
|
||||
|
||||
If the buffer is already empty, nothing happens.
|
||||
|
||||
It should only be called from the main application thread.
|
||||
|
||||
If you override this method in a derived class, call the base class
|
||||
version first, before doing anything else, to ensure that any buffered
|
||||
messages from the other threads are logged.
|
||||
*/
|
||||
virtual void Flush();
|
||||
|
||||
/**
|
||||
Flushes the current log target if any, does nothing if there is none.
|
||||
|
||||
@see Flush()
|
||||
As Flush() itself, this method should only be called from the main
|
||||
application thread.
|
||||
*/
|
||||
static void FlushActive();
|
||||
|
||||
|
Reference in New Issue
Block a user