Expanded comment in Initialize to include why Initialize is needed on OS X
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -132,6 +132,11 @@ bool wxSocketBase::Initialize()
|
|||||||
BTW, the main thread must not be stopped using sleep or block
|
BTW, the main thread must not be stopped using sleep or block
|
||||||
on a semaphore (a bad idea in any case) or socket operations
|
on a semaphore (a bad idea in any case) or socket operations
|
||||||
will time out.
|
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(),
|
wxASSERT_MSG( wxIsMainThread(),
|
||||||
wxT("Call wxSocketBase::Initialize() from the main thread first!"));
|
wxT("Call wxSocketBase::Initialize() from the main thread first!"));
|
||||||
|
Reference in New Issue
Block a user