wxSocket::Initialize() and Shutdown() are for main thread only.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 21 Sep 2009 08:44:35 +0000 (08:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 21 Sep 2009 08:44:35 +0000 (08:44 +0000)
commit4017f5ca49e153e04ffd1c49bc93afd31c1cdf87
treede3046f415804b9fe19408d6fef851f76c93d1e9
parent7b7ad6a7f2761c850ea085599a9aa44b0da87919
wxSocket::Initialize() and Shutdown() are for main thread only.

Calling Initialize() from another thread could never work before but it wasn't
clear that this was the case so document it in the functions comments and
documentation now and add asserts checking that they are called from the main
thread only.

Also simplify the code as we don't actually need to do any reference-counting
here and a simple boolean flag indicating whether the sockets are initialized
is enough.

Closes #11119.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/socket.h
interface/wx/socket.h
src/common/socket.cpp