- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for increfAndClose (0.18 sec)
-
src/internal/poll/fd_plan9.go
if fd.Destroy != nil { fd.Destroy() } return nil } // Close handles the locking for closing an FD. The real operation // is in the net package. func (fd *FD) Close() error { if !fd.fdmu.increfAndClose() { return errClosing(fd.isFile) } return nil } // Read implements io.Reader. func (fd *FD) Read(fn func([]byte) (int, error), b []byte) (int, error) { if err := fd.readLock(); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 14:00:54 UTC 2024 - 5.4K bytes - Viewed (0) -
src/internal/poll/fd_unix.go
return err } // Close closes the FD. The underlying file descriptor is closed by the // destroy method when there are no remaining references. func (fd *FD) Close() error { if !fd.fdmu.increfAndClose() { return errClosing(fd.isFile) } // Unblock any I/O. Once it all unblocks and returns, // so that it cannot be referring to fd.sysfd anymore, // the final decref will close fd.sysfd. This should happen
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 31 04:09:44 UTC 2024 - 17.9K bytes - Viewed (0) -
src/os/file_plan9.go
func (f *File) Close() error { if f == nil { return ErrInvalid } return f.file.close() } func (file *file) close() error { if !file.fdmu.IncrefAndClose() { return &PathError{Op: "close", Path: file.name, Err: ErrClosed} } // At this point we should cancel any pending I/O. // How do we do that on Plan 9? err := file.decref()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 30 15:35:30 UTC 2024 - 16K bytes - Viewed (0)