- if (m_thread_waiter->Create() != wxTHREAD_NO_ERROR) {
- // Something should be done here.
- return;
- }
-
- if (m_thread_requester->Create() != wxTHREAD_NO_ERROR) {
- // Something should be done here.
- return;
+ m_thread_requester = new SocketRequester(m_socket, this);
+
+ err = m_thread_requester->Create();
+ wxASSERT(err == wxTHREAD_NO_ERROR);
+
+ err = m_thread_requester->Run();
+ wxASSERT(err == wxTHREAD_NO_ERROR);
+
+#endif
+}
+
+void wxSocketInternal::StopRequester()
+{
+#if wxUSE_THREADS
+ m_end_requester.Lock();
+ if (m_invalid_requester) {
+ m_end_requester.Unlock();
+ if (m_thread_requester) {
+ delete m_thread_requester;
+ m_thread_requester = NULL;