Source File
waitforread_unix.go
Belonging Package
src.elv.sh/pkg/sys
// +build !windows,!plan9package sysimport ()// WaitForRead blocks until any of the given files is ready to be read or// timeout. A negative timeout means no timeout. It returns a boolean array// indicating which files are ready to be read and any possible error.func ( time.Duration, ...*os.File) ( []bool, error) {:= 0:= NewFdSet()for , := range {:= int(.Fd())if < {=}.Set()}= Select(+1, , nil, nil, )= make([]bool, len())for , := range {[] = .IsSet(int(.Fd()))}return ,}
The pages are generated with Golds v0.2.8-preview. (GOOS=darwin GOARCH=arm64)