* fhandler_socket.cc (fhandler_socket::wait_for_events): Call

pthread_testcancel in case of timeout to enable pthread_cancel
	on waiting thread.
This commit is contained in:
Corinna Vinschen 2011-01-28 11:17:29 +00:00
parent 656df313e0
commit 93a4d9d97c
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2011-01-28 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::wait_for_events): Call
pthread_testcancel in case of timeout to enable pthread_cancel
on waiting thread.
2011-01-27 Corinna Vinschen <corinna@vinschen.de>
* include/features.h (__STDC_ISO_10646__): Move to newlib's

View File

@ -626,6 +626,8 @@ fhandler_socket::wait_for_events (const long event_mask, const DWORD flags)
switch (WSAWaitForMultipleEvents (2, ev, FALSE, 50, FALSE))
{
case WSA_WAIT_TIMEOUT:
pthread_testcancel ();
/*FALLTHRU*/
case WSA_WAIT_EVENT_0:
break;