Boost Users :
Subject: Re: [Boost-users] [asio] sync receive_from with timeout
From: Stephan Menzel (stephan.menzel_at_[hidden])
Date: 2009-03-04 05:18:55
> documented. I tested this with gcc compiler and it worked. May be this
> be a possible fix for asio developers to promise that synchronous sockets
> are interruptable via boost::thread interruption.
> Actually in my case it was a prototype, and it stayed so and I probably
> would never rely on that in the production code, but wanted to show that
> there might be a quick fix for this issue.
Well, an interesting approach. Alas, I'd rather not stray so far into the realm of workarounds but try to solve the issue in a more standard and mean-to-be way. Also it has to work on windows and several unix flavours. My favorite solution would be the boost community would consider to include timouts in sync IO hence making it useful and adding value to asio.
I'm not sure whether I understand correctly what you suggest but wouldn't that affect the socket itself rather than the code using it?
In my case the socket is a static object and protected via mutex so there's no thread ownership in general sense.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net