On Saturday, 3 August 2013 at 15:59:30 UTC, Marek Janukowicz
wrote:
It's really nice to have some chat about the correctness of
example code
snippets, but can anyone help me with the original issue? :)
Sorry, apparently I forgot to include the actual content:. ;)
Socket.select is an ancient (in D terms) API; you just need to
handle the returned error code manually and retry if the errno is
actually EINTR resp. its WinSock equivalent.
See
https://github.com/apache/thrift/blob/master/lib/d/src/thrift/server/transport/socket.d#L144
for a production-tested implementation. When I wrote that code,
it wasn't possible to do this in a platform-independent way using
std.socket (see
https://github.com/apache/thrift/blob/master/lib/d/src/thrift/internal/socket.d
for the used constants), and I don't think it is now either.
David