- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for newAsyncIO (0.13 sec)
-
src/internal/poll/fd_io_plan9.go
pid int } // result is the return value of a Read or Write operation. type result struct { n int err error } // newAsyncIO returns a new asyncIO that performs an I/O // operation by calling fn, which must do one and only one // interruptible system call. func newAsyncIO(fn func([]byte) (int, error), b []byte) *asyncIO { aio := &asyncIO{ res: make(chan result, 0), } aio.mu.Lock() go func() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Mar 14 17:56:50 UTC 2021 - 2.1K bytes - Viewed (0) -
src/internal/poll/fd_plan9.go
return 0, err } defer fd.readUnlock() if len(b) == 0 { return 0, nil } fd.rmu.Lock() if fd.rtimedout { fd.rmu.Unlock() return 0, ErrDeadlineExceeded } fd.raio = newAsyncIO(fn, b) fd.rmu.Unlock() n, err := fd.raio.Wait() fd.raio = nil if isHangup(err) { err = io.EOF } if isInterrupted(err) { err = ErrDeadlineExceeded } return n, err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 14:00:54 UTC 2024 - 5.4K bytes - Viewed (0)