# chhenning@gmail.com / 2006-10-30 09:49:31 -0500:
On 10/30/06, Christopher Kohlhoff
wrote: Can you please try the following change to asio/detail/win_iocp_io_service.hpp:
@@ -74,10 +74,11 @@ DWORD_PTR completion_key = 0; #endif LPOVERLAPPED overlapped = 0; - ::GetQueuedCompletionStatus(iocp_.handle, + ::SetLastError(0); + BOOL ok = ::GetQueuedCompletionStatus(iocp_.handle, &bytes_transferred, &completion_key, &overlapped, 0); DWORD last_error = ::GetLastError(); - if (last_error == WAIT_TIMEOUT) + if (!ok && overlapped == 0 && last_error == WAIT_TIMEOUT) break; if (overlapped) static_cast
(overlapped)->destroy(); This is most likely offtopic, but how do apply that patch to a source file? Have never done that. Is there a program I should use?
Diffs (or patches, these are synonyms) are applied with a program called "patch". The text above is only a fragment of a complete diff, and patch won't process it. Your best bet is to "apply" it by hand: replace the lines marked with "-" with those beginning with "+". The block displayed above begins on line 74 in asio/detail/win_iocp_io_service.hpp. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991