Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::asio blocking socket read with timeout with multiple threads
From: tom_at_[hidden]
Date: 2018-03-23 09:41:15


> Of course the correct way to "cancel" a sync call in linux is to raise a
> signal, which should cause the socket's read to return with EINTR.

Not sure I understand. So is a deadline timer callback raises something like SIG_USR1, then a boost asio call to socket.read_some will return with an error code? If that's so, then that gives an easy way to implement a timeout doesn't it? My suspicion is that although the raw socket recv call may return that EINTR, I won't see that at the boost::asio level, but I'll give it a go. I may be misunderstanding though.


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