MCPcopy
hub / github.com/wavetermdev/waveterm / NewWorkQueue

Function NewWorkQueue

pkg/utilds/workqueue.go:15–21  ·  view source on GitHub ↗
(workFn func(T))

Source from the content-addressed store, hash-verified

13}
14
15func NewWorkQueue[T any](workFn func(T)) *WorkQueue[T] {
16 wq := &WorkQueue[T]{
17 workFn: workFn,
18 }
19 wq.cond = sync.NewCond(&wq.lock)
20 return wq
21}
22
23func (wq *WorkQueue[T]) Enqueue(item T) bool {
24 wq.lock.Lock()

Callers 1

NewBrokerFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected