Re: [Boost-bugs] [Boost C++ Libraries] #8933: on the windows platform async reads with multiple threads can produce random EOF errors

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8933: on the windows platform async reads with multiple threads can produce random EOF errors
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-10 11:02:12


#8933: on the windows platform async reads with multiple threads can produce
random EOF errors
-----------------------------------------+----------------------------
  Reporter: Shane Powell <killerbee@…> | Owner: chris_kohlhoff
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: asio
   Version: Boost 1.54.0 | Severity: Showstopper
Resolution: | Keywords:
-----------------------------------------+----------------------------

Comment (by simoncperkins@…):

 I don't believe that handling the notification directly without on_pending
 is a problem for the following reasons:

 1) The existing I/O operation has already completed (even though the API
 may not have returned) if another thread picks up the notification using
 GetQueueCompletionStatus().

 2) None of the multi-threaded samples I looked at on MSDN worry about
 calling WSARecv/WSASend in a notification handler even though the
 originating API may not have returned.

 3) The MSDN docs for WSARecv explicitly state that this is acceptable:

 *** "The WSARecv function using overlapped I/O can be called from within
 the completion routine of a previous WSARecv, WSARecvFrom, WSASend or
 WSASendTo function. For a given socket, I/O completion routines will not
 be nested. This permits time-sensitive data transmissions to occur
 entirely within a preemptive context." ***

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8933#comment:10>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC