Are non-blocking Linux sockets thread-safe for multiple writers?
Summary Multiple threads writing to a shared non-blocking TCP socket is not inherently thread-safe. The Linux kernel does not guarantee that data from different send() calls will be serialized without interleaving, even though send() itself is a single system call. In practice, data may interleave if writes are partial and buffers overlap, or if the … Read more