fix bug related to sleeping and Windows networking
svn: r14053
This commit is contained in:
parent
63af81bd85
commit
d647999705
|
@ -303,7 +303,8 @@ void MrEdDispatchEvent(MSG *msg)
|
||||||
LeaveEvent *e;
|
LeaveEvent *e;
|
||||||
e = (LeaveEvent *)GET_SAFEREF(sr);
|
e = (LeaveEvent *)GET_SAFEREF(sr);
|
||||||
FREE_SAFEREF(sr);
|
FREE_SAFEREF(sr);
|
||||||
wxDoLeaveEvent(e->wnd, e->x, e->y, e->flags);
|
if (e)
|
||||||
|
wxDoLeaveEvent(e->wnd, e->x, e->y, e->flags);
|
||||||
} else if (!wxTheApp->ProcessMessage(msg)) {
|
} else if (!wxTheApp->ProcessMessage(msg)) {
|
||||||
#if wxLOG_EVENTS
|
#if wxLOG_EVENTS
|
||||||
if (!log)
|
if (!log)
|
||||||
|
@ -983,7 +984,10 @@ void MrEdMSWSleep(float secs, void *fds)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (th2) {
|
if (th2) {
|
||||||
closesocket(fake);
|
while (closesocket(fake)) {
|
||||||
|
if (WSAGetLastError() != WSAEINPROGRESS)
|
||||||
|
break;
|
||||||
|
}
|
||||||
WaitForSingleObject(th2, INFINITE);
|
WaitForSingleObject(th2, INFINITE);
|
||||||
scheme_forget_thread(thread_memory);
|
scheme_forget_thread(thread_memory);
|
||||||
CloseHandle(th2);
|
CloseHandle(th2);
|
||||||
|
|
|
@ -8102,7 +8102,11 @@ static void default_sleep(float v, void *fds)
|
||||||
}
|
}
|
||||||
clean_up_wait(result, array, rps, count);
|
clean_up_wait(result, array, rps, count);
|
||||||
|
|
||||||
closesocket(fake); /* cause selector thread to end */
|
/* cause selector thread to end: */
|
||||||
|
while (closesocket(fake)) {
|
||||||
|
if (WSAGetLastError() != WSAEINPROGRESS)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
WaitForSingleObject(th, INFINITE);
|
WaitForSingleObject(th, INFINITE);
|
||||||
scheme_forget_thread(thread_memory);
|
scheme_forget_thread(thread_memory);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user