Subject: Re: send(), sendmsg(), sendto() not thread-safe

From: Rick Jones <[email-masked]>
Date: Mon, 15 May 2006 17:02:35 -0700

>>I presume this is only for "blocking" sockets?  I cannot at least off 
>>the top of my head see how a stack could offer it on non-blocking sockets.
> 
> 
> The test seems to be based on sending a big message. In this case,
> on non-blocking sockets, the send call will return partial status. The
> return from the system call will be less than the number of bytes requested.

Right, and at that point it is already too late to do anything about 
keeping some other thread of execution from shoving _its_ bytes into the 
socket before the rest of the first sends' can be put there.

(Perhaps I'm preaching to the choir)

rick jones