Core Concepts
Last updated
This page maps each scheduling question to the page that answers it; every rule below lives in github.com/pardnchiu/go-queue/core.
Where to Look
| Question | Page |
|---|---|
| Which task runs first, and where does its priority come from? | Priority Levels |
| Can a low-priority task wait forever? | Anti-Starvation Promotion |
| How long may a task run? | Timeout Derivation |
| What happens on panic, timeout, or error, and how do retries work? | Execution and Retries |
When can I call Enqueue, Start, and Shutdown? |
Queue Lifecycle |
Task Path at a Glance
Enqueueresolves the preset's priority and timeout, then pushes the task into one bounded min-heap- An idle worker calls
Pop; eachPopfirst promotes tasks that have waited too long - The worker runs the task under a timeout ctx with panic recovery
- A failed task with retries left re-enters the heap at
PriorityRetry; everything else ends in aslogevent