Do I have to synchronize TcpStream::write_all calls to avoid interleaving?
I have a TcpStream
(from the standard library) and would like to write to it from multiple threads. TcpStream
allows this without additional synchronization due to impl Write for &TcpStream
. The payloads are packaged such that I make a single .write_all()
call per payload.
Do I have to synchronize concurrent TcpStream::write_all calls to avoid interleaving?
I have a TcpStream
(from the standard library) and would like to write to it from multiple threads. TcpStream
allows this without additional synchronization due to impl Write for &TcpStream
. The payloads are packaged such that I make a single .write_all()
call per payload.