evqueue

package
v0.1.0-alpha.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package evqueue is the unbounded, coalescing event queue every native shell uses between its OS event loop and the consumer. The OS loop must never block on a slow consumer (it also services redraw and clipboard requests), so Push never blocks; bursts of mouse-move, wheel and resize events are merged while they wait in the queue.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

func New

func New() *Queue

New starts the queue's delivery goroutine.

func (*Queue) Close

func (q *Queue) Close()

Close stops delivery and closes Events. Pending events are discarded.

func (*Queue) Events

func (q *Queue) Events() <-chan shell.Event

Events is the consumer side. It is closed after Close.

func (*Queue) Push

func (q *Queue) Push(ev shell.Event)

Push appends ev, merging it into the last pending event when they are the same coalescible kind. Safe for concurrent use; never blocks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL