Commit e86bbc2e authored by Ian Lance Taylor's avatar Ian Lance Taylor

os: clarify that Close cancels pending I/O

Change-Id: I6be6818d951a999f916c2266a6753a5ce5144ee7
Reviewed-on: https://go-review.googlesource.com/122955Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarRob Pike <r@golang.org>
parent f5921d48
......@@ -133,7 +133,8 @@ func openFileNolog(name string, flag int, perm FileMode) (*File, error) {
}
// Close closes the File, rendering it unusable for I/O.
// It returns an error, if any.
// On files that support SetDeadline, any pending I/O operations will
// be canceled and return immediately with an error.
func (f *File) Close() error {
if err := f.checkValid("close"); err != nil {
return err
......
......@@ -217,7 +217,8 @@ func openFileNolog(name string, flag int, perm FileMode) (*File, error) {
}
// Close closes the File, rendering it unusable for I/O.
// It returns an error, if any.
// On files that support SetDeadline, any pending I/O operations will
// be canceled and return immediately with an error.
func (f *File) Close() error {
if f == nil {
return ErrInvalid
......
......@@ -171,7 +171,8 @@ func openFileNolog(name string, flag int, perm FileMode) (*File, error) {
}
// Close closes the File, rendering it unusable for I/O.
// It returns an error, if any.
// On files that support SetDeadline, any pending I/O operations will
// be canceled and return immediately with an error.
func (file *File) Close() error {
if file == nil {
return ErrInvalid
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment