I have a multithreaded server and I want to be able to gracefully
cancel a blocking call to send, recv, or select. Is it safe to call
shutdown() on the socket from another thread? And if so, will this
reliably break out of send/recv/select so the thread can exit cleanly?
Unix platforms handle this, but I wasn't sure if this is safe on
Windows.

The way I do this today is by using WSAEventSelect to associate an
event handle with each socket then use WaitForMultipleObjects on the
event handle and socket. This works, but it means I need an extra
event handle for each socket, which I'd like to avoid.