diff --git a/interface/wx/thread.h b/interface/wx/thread.h index 9eedf87a42..96ed7dcdd8 100644 --- a/interface/wx/thread.h +++ b/interface/wx/thread.h @@ -23,6 +23,8 @@ enum wxCondError They may be used in a multithreaded application to wait until the given condition becomes @true which happens when the condition becomes signaled. + @note In C++11 programs, prefer using @c std::condition to this class. + For example, if a worker thread is doing some long task and another thread has to wait until it is finished, the latter thread will wait on the condition object and the worker thread will signal it on exit (this example is not @@ -720,6 +722,8 @@ enum wxThreadError between threads and processes is that memory spaces of different processes are separated while all threads share the same address space. + @note In C++11 programs, consider using @c std::thread instead of this class. + While it makes it much easier to share common data between several threads, it also makes it much easier to shoot oneself in the foot, so careful use of synchronization objects such as mutexes (see wxMutex) or critical sections @@ -1569,6 +1573,8 @@ enum wxMutexError from its usefulness in coordinating mutually-exclusive access to a shared resource as only one thread at a time can own a mutex object. + @note In C++11 programs, prefer using @c std::mutex to this class. + Mutexes may be recursive in the sense that a thread can lock a mutex which it had already locked before (instead of dead locking the entire process in this situation by starting to wait on a mutex which will never be released while the