Boost logo

Boost :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2008-02-04 02:46:16


This is my second attempt, since there was no
meaningful answer on the first.

I again apologize for cross-posting but I still
have no idea which is the correct list to post asio
related questions.

Roland Schwarz wrote:
> One of my objectives is getting cancellation in a
> platform independent way. Since on windows blocking
> io cannot be canceled I tried to use asio to emulate
> the required behavior.
>
> This works well on linux, but the same code fails
> on windows. During a debug session it appeared to me
> as if the CancelIO call is not being honored (WindowsXP).
>
> Is this a bug in asio or am I doing something wrong.
>
> I put together a stripped down example to show
> the "erroneous" behavior.
>
> The examples main thread connects to localhost port 80 and
> then schedules an async read call.
>
> A second polling thread checks for ctrl-c beeing pressed
> and invokes the sockets cancel function.
>
> On linux this causes the read handler to terminate with
> Oeration Cancelled
> as expected, but on windows the cancel request is simply
> swallowed.
>
> Any help appreciated!
>

-- 
_________________________________________
  _  _  | Roland Schwarz
 |_)(_  | aka. speedsnail
 | \__) | mailto:roland.schwarz_at_[hidden]
________| http://www.blackspace.at


# $Id: Jamroot 49 2008-01-08 14:20:45Z rs $

project cancel ;

#use-project boost : "C:/projects/boost/trunk" ;
use-project boost : /home/roland/projects/boost/trunk ;

lib winsock : : <name>ws2_32 ;
lib mswsock : : <name>mswsock ;

exe cancel
    : cancel.cpp
    : <link>static
      <threading>multi
      <target-os>windows:<library>winsock
      <target-os>windows:<library>mswsock
      <target-os>windows:<define>_WIN32_WINNT=0x0500
      <library>/boost//system
      <library>/boost//regex
      <library>/boost//date_time
      <library>/boost//thread
    ;
    
install dist : cancel : <location>. ;




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk