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

Method Complete

interpreter/async.go:506–522  ·  view source on GitHub ↗

Complete releases a concurrency slot and notifies completions.

(ctx context.Context, callID int64)

Source from the content-addressed store, hash-verified

504
505// Complete releases a concurrency slot and notifies completions.
506func (g *asyncGate) Complete(ctx context.Context, callID int64) {
507 if g == nil {
508 return
509 }
510 g.Release()
511
512 if g.completions != nil {
513 // Prioritize context cancellation to prevent racy completion signals.
514 if ctx.Err() != nil {
515 return
516 }
517 select {
518 case g.completions <- callID:
519 case <-ctx.Done():
520 }
521 }
522}
523
524// ActiveCalls returns the number of active asynchronous calls.
525func (g *asyncGate) ActiveCalls() int {

Callers 1

launchMethod · 0.80

Calls 2

ReleaseMethod · 0.95
ErrMethod · 0.80

Tested by

no test coverage detected