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
It should be possible to cancel PseudoFile operations like Read and Write. This would imply support for cancellation at the proto level as well.
I think the best way to accomplish this would be SetDeadline methods on PseudoFile and Session. These would translate directly to SetDeadline calls on the underlying net.Conn. If a timeout occurs, the caller should be able to determine this by unwrapping the resulting error.
Adding context.Context arguments to every method is also an option, but I've never liked this pattern. It pollutes the API and drags in non-cancellation baggage that is almost never used.
The text was updated successfully, but these errors were encountered:
It should be possible to cancel
PseudoFile
operations likeRead
andWrite
. This would imply support for cancellation at theproto
level as well.I think the best way to accomplish this would be
SetDeadline
methods onPseudoFile
andSession
. These would translate directly toSetDeadline
calls on the underlyingnet.Conn
. If a timeout occurs, the caller should be able to determine this by unwrapping the resulting error.Adding
context.Context
arguments to every method is also an option, but I've never liked this pattern. It pollutes the API and drags in non-cancellation baggage that is almost never used.The text was updated successfully, but these errors were encountered: