mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
os: clarify that Close cancels pending I/O
Change-Id: I6be6818d951a999f916c2266a6753a5ce5144ee7 Reviewed-on: https://go-review.googlesource.com/122955 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
f5921d48f1
commit
e86bbc2e27
3 changed files with 6 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue