package poll

import "internal/poll"

Package poll supports non-blocking I/O on file descriptors with polling. This supports I/O operations that block only a goroutine, not a thread. This is used by the net and os packages. It uses a poller built into the runtime, with support from the runtime scheduler.

Index

Variables

var ErrFileClosing = errors.New("use of closed file")

ErrFileClosing is returned when a file descriptor is used after it has been closed.

var ErrNetClosing = errors.New("use of closed network connection")

ErrNetClosing is returned when a network descriptor is used after it has been closed. Keep this string consistent because of issue #4373: since historically programs have not been able to detect this error, they look for the string.

var ErrNoDeadline = errors.New("file type does not support deadline")

ErrNoDeadline is returned when a request is made to set a deadline on a file type that does not use the poller.

var ErrTimeout error = &TimeoutError{}

ErrTimeout is returned for an expired deadline.

var TestHookDidWritev = func(wrote int) {}

TestHookDidWritev is a hook for testing writev.

Types

type TimeoutError

type TimeoutError struct{}

TimeoutError is returned for an expired deadline.

func (*TimeoutError) Error

func (e *TimeoutError) Error() string

Implement the net.Error interface.

func (*TimeoutError) Temporary

func (e *TimeoutError) Temporary() bool

func (*TimeoutError) Timeout

func (e *TimeoutError) Timeout() bool

Source Files

fd.go fd_mutex.go

Version
v1.10.2
Published
Apr 30, 2018
Platform
js/wasm
Imports
2 packages
Last checked
now

Tools for package owners.