On 12/21/2013 3:24 AM, Roger Pack wrote: > So I guess my order of preference would be "closing the socket" (or > using current pthread cancel code, which happens to do this) then > "poll+self-pipe" > POSIX requires fd reusing. I think closing a socket from another thread is inherently racy.