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

Method Complete

interpreter/async.go:511–527  ·  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

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

Callers 1

launchMethod · 0.80

Calls 2

ReleaseMethod · 0.95
ErrMethod · 0.80

Tested by

no test coverage detected