dialogqueue

package
v0.3.28 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 1 Imported by: 1 module, 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 dialogqueue orders the requests one shell dialog surface serves: one shows at a time, and the rest wait their turn in arrival order instead of cancelling the one showing.

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
}

Queue is one surface's requests. Loop goroutine only.

func (*Queue) CancelWaiting added in v0.3.25

func (q *Queue) CancelWaiting()

CancelWaiting answers every waiting request cancelled, in arrival order, without showing it: the surface is going away.

func (*Queue) Dismiss

func (q *Queue) Dismiss(handle string) (showing bool)

Dismiss drops a waiting request for handle, answering it cancelled; it reports whether handle is instead the one showing, which the caller takes down (and then calls Done).

func (*Queue) Done

func (q *Queue) Done()

Done marks the showing request answered and shows the next one.

func (*Queue) Enqueue

func (q *Queue) Enqueue(handle string, start, cancel func())

Enqueue shows the request for handle at once when nothing shows, else queues it: start shows it, cancel answers it cancelled without showing it (when it is dismissed while waiting).

func (*Queue) Len

func (q *Queue) Len() int

Len is the number of requests waiting behind the one showing.

func (*Queue) Showing

func (q *Queue) Showing(handle string) bool

Showing reports whether handle names the request showing.

Jump to

Keyboard shortcuts

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