MCPcopy Create free account
hub / github.com/cel-expr/cel-go / newAsyncGate

Function newAsyncGate

interpreter/async.go:464–473  ·  view source on GitHub ↗
(maxConcurrency int, completions chan<- int64)

Source from the content-addressed store, hash-verified

462}
463
464func newAsyncGate(maxConcurrency int, completions chan<- int64) *asyncGate {
465 var sem chan struct{}
466 if maxConcurrency > 0 {
467 sem = make(chan struct{}, maxConcurrency)
468 }
469 return &asyncGate{
470 semaphore: sem,
471 completions: completions,
472 }
473}
474
475// TryAcquire attempts to acquire a concurrency slot and increments the active calls count.
476func (g *asyncGate) TryAcquire() bool {

Calls

no outgoing calls