You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Some methods in TcpStream contain a note regarding their cancel safety, such as TcpStream::readable. However, this information is not present with the TcpStream::peek method. The only reference I could find there, is that it uses the recv system call with the MSG_PEEK argument, potentially referring the user to dig into the abyss of the respective Unix manual pages.
I expected to see this happen: A subsection on cancel safety for the TcpStream::peek method.
The text was updated successfully, but these errors were encountered:
I assume it is cancel safe, because the documentation points out that it is just a recv system call with the MSG_PEEK flag. Given that an abortion of that single system call does not create a faulty state or something, my intuition would argue it being cancel safe.
Version
latest
Platform
Documentation related
Description
Some methods in
TcpStream
contain a note regarding their cancel safety, such asTcpStream::readable
. However, this information is not present with theTcpStream::peek
method. The only reference I could find there, is that it uses therecv
system call with theMSG_PEEK
argument, potentially referring the user to dig into the abyss of the respective Unix manual pages.I expected to see this happen: A subsection on cancel safety for the
TcpStream::peek
method.The text was updated successfully, but these errors were encountered: