12-priority-queue

command
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Example 12 — Priority queue: high-priority items jump the line.

Demonstrates:

  • WithPriorityEnabled on a queue
  • WithPriority(n) on each enqueue (lower n = higher priority)
  • Items dispatch in priority order, not enqueue order

Run: go run .

Jump to

Keyboard shortcuts

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