FAQ
https://codereview.appspot.com/6869054/diff/1003/src/pkg/net/net.go
File src/pkg/net/net.go (right):

https://codereview.appspot.com/6869054/diff/1003/src/pkg/net/net.go#newcode203
src/pkg/net/net.go:203: // The file descriptor associated with the
returned os.File shares status
This is too detailed. It's describing a specific implementation, not an
API.

// The returned os.File's file descriptor is different from the
connection's.
// Attempting to change properties of the original using this duplicate
// may or may not have the desired effect.

might be enough.

https://codereview.appspot.com/6869054/

Search Discussions

  • Rickarnoldjr at Dec 4, 2012 at 5:20 pm

    On 2012/12/04 15:22:09, rsc wrote:
    This is too detailed. It's describing a specific implementation, not
    an API.

    I think mikio was trying to get me to document the side effect that
    calling File will set both the connection and the returned os.File to
    blocking mode even if you don't do anything with the fd directly (since
    they share the same underlying status attributes). Should that be
    documented still?

    Thanks.



    https://codereview.appspot.com/6869054/
  • Mikioh Mikioh at Dec 4, 2012 at 10:03 pm

    On 2012/12/04 17:20:51, rick wrote:

    I think mikio was trying to get me to document the side effect that
    calling File
    will set both the connection and the returned os.File to blocking mode even if
    you don't do anything with the fd directly (since they share the same
    underlying
    status attributes). Should that be documented still?
    I'm okay with Russ's proposal because it includes the words "using this
    dup",
    "conn's properties" and "undesired effect". Thanks.

    https://codereview.appspot.com/6869054/
  • Rémy Oudompheng at Dec 5, 2012 at 12:02 am

    On 2012/12/4 wrote:
    I'm okay with Russ's proposal because it includes the words "using this
    dup",
    "conn's properties" and "undesired effect". Thanks.

    https://codereview.appspot.com/6869054/
    I have the impression that Russ proposal removes the idea that the
    original Conn is no longer suitable for use (i.e. not only changing
    the properties may have unpredictable effects, but the very invocation
    of File also have side effects).
  • Rickarnoldjr at Dec 4, 2012 at 11:01 pm
    PTAL

    How about this simple change to cover both cases?


    https://codereview.appspot.com/6869054/
  • Mikioh Mikioh at Dec 5, 2012 at 5:17 am
    LGTM, leave for others to submit.

    https://codereview.appspot.com/6869054/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedDec 4, '12 at 3:22p
activeDec 5, '12 at 5:17a
posts6
users4
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase