MCPcopy Create free account
hub / github.com/blindlobstar/go-interview-problems / Queue

Struct Queue

10-concurrent-queue/solution/solution.go:7–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5var ErrQueueFull = errors.New("queue is full")
6
7type Queue struct {
8 ch chan int
9}
10
11func NewQueue(size int) *Queue {
12 return &Queue{ch: make(chan int, size)}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected