Documentation
¶
Overview ¶
Package fdmap maps OS descriptors to connection objects using the cheapest synchronization available on each platform.
Index ¶
Constants ¶
const UseSingleInstance = true
Unix fds are small integers, so all event loops can share one direct index.
Variables ¶
var ErrOutOfRange = errors.New("fdmap: descriptor out of range")
var MaxOpenFiles = maxOpenFilesCeiling
MaxOpenFiles covers the conventional Unix per-process fd ceiling. It is reduced to the process soft limit during initialization when necessary.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map[V any] struct { // contains filtered or unexported fields }
Map is an atomic direct-index table shared by Unix event loops. Deletion must be published before a descriptor is closed because the kernel may reuse its integer immediately.
func NewMap ¶
NewMap allocates the fixed descriptor table once; individual entries do not allocate on Put or Delete.