X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d775fa82354a1f8d5db87ad1d71ab00ef7d9123c..0356c2597ec9f604918c880e3057650a7bf467f6:/src/common/socket.cpp diff --git a/src/common/socket.cpp b/src/common/socket.cpp index eb955def01..f4f42cc31f 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -40,6 +40,7 @@ #include "wx/sckaddr.h" #include "wx/socket.h" +#include "wx/stopwatch.h" // DLL options compatibility check: #include "wx/build.h" @@ -132,6 +133,11 @@ bool wxSocketBase::Initialize() BTW, the main thread must not be stopped using sleep or block on a semaphore (a bad idea in any case) or socket operations will time out. + + On the Mac side, Initialize() stores a pointer to the CFRunLoop for + the main thread. Because secondary threads do not have run loops, + adding event notifications to the "Current" loop would have no + effect at all, events would never fire. */ wxASSERT_MSG( wxIsMainThread(), wxT("Call wxSocketBase::Initialize() from the main thread first!"));