Update of /cvsroot/boost/boost/boost/asio/detail
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26220
Modified Files:
win_iocp_io_service.hpp
Log Message:
Add a workaround for an apparent Windows bug where the delivery of
asynchronous I/O completions is delayed if the thread used to start the
operation is CPU bound.
Index: win_iocp_io_service.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/asio/detail/win_iocp_io_service.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- win_iocp_io_service.hpp 16 Nov 2006 11:50:56 -0000 1.5
+++ win_iocp_io_service.hpp 17 Nov 2006 11:40:48 -0000 1.6
@@ -260,11 +260,15 @@
LPOVERLAPPED overlapped = 0;
::SetLastError(0);
BOOL ok = ::GetQueuedCompletionStatus(iocp_.handle, &bytes_transferred,
- &completion_key, &overlapped, block ? INFINITE : 0);
+ &completion_key, &overlapped, block ? 1000 : 0);
DWORD last_error = ::GetLastError();
if (!ok && overlapped == 0)
+ {
+ if (block && last_error == WAIT_TIMEOUT)
+ continue;
return 0;
+ }
if (overlapped)
{
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs