Split wxWakeUpPipe class in MT-unsafe and MT-safe parts.

This class can also be useful when it's used in the main thread only, so
leave the lock-less part of the code in wxWakeUpPipe and derive a separate
wxWakeUpPipeMT from it for the use in wxConsoleEventLoop where it can be used
by multiple threads.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-07-03 00:27:53 +00:00
parent 2ccfebab09
commit bd7cea0ea6
4 changed files with 45 additions and 14 deletions

View File

@@ -51,7 +51,7 @@
wxConsoleEventLoop::wxConsoleEventLoop()
{
m_wakeupPipe = new wxWakeUpPipe;
m_wakeupPipe = new wxWakeUpPipeMT;
const int pipeFD = m_wakeupPipe->GetReadFd();
if ( pipeFD == wxPipe::INVALID_FD )
{