MCPcopy
hub / github.com/esm-dev/esm.sh / NewBuildQueue

Function NewBuildQueue

server/build_queue.go:34–44  ·  view source on GitHub ↗
(concurrency int)

Source from the content-addressed store, hash-verified

32}
33
34func NewBuildQueue(concurrency int) *BuildQueue {
35 if concurrency <= 0 {
36 concurrency = 1 // ensure at least 1 concurrent task
37 }
38 return &BuildQueue{
39 queue: map[*BuildTask]struct{}{},
40 pending: list.New(),
41 tasks: map[string]*BuildTask{},
42 chann: concurrency,
43 }
44}
45
46// Add adds a new build task to the queue.
47func (q *BuildQueue) Add(ctx *BuildContext) chan BuildOutput {

Callers 1

esmRouterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected