// call when holding the manager lock
353835
func (cr *cacheRecord) remove(ctx context.Context, removeSnapshot bool) error {
	delete(cr.cm.records, cr.ID())
	if cr.parent != nil {
		if err := cr.parent.(*immutableRef).release(ctx); err != nil {
			return err
		}
	}
	if removeSnapshot {
		if err := cr.cm.Snapshotter.Remove(ctx, cr.ID()); err != nil {
			return err
		}
	}
	if err := cr.cm.md.Clear(cr.ID()); err != nil {
		return err
	}
	return nil
}
316826
func (dc *DispatcherClient) Call(funcName string, request interface{}) (response interface{}, err error) {
	return dc.CallTimeout(funcName, request, dc.c.RequestTimeout)
}
1220513
func Caller(skip int) Call {
	// As of Go 1.9 we need room for up to three PC entries.
	//
	// 0. An entry for the stack frame prior to the target to check for
	//    special handling needed if that prior entry is runtime.sigpanic.
	// 1. A possible second entry to hold metadata about skipped inlined
	//    functions. If inline functions were not skipped the target frame
	//    PC will be here.
	// 2. A third entry for the target frame PC when the second entry
	//    is used for skipped inline functions.
	var pcs [3]uintptr
	n := runtime.Callers(skip+1, pcs[:])
	frames := runtime.CallersFrames(pcs[:n])
	frame, _ := frames.Next()
	frame, _ = frames.Next()

	return Call{
		frame: frame,
	}
}
647345
func (d *Dispatch) Call(method string, params ...interface{}) (result *VARIANT, err error) {
	id, err := d.GetId(method)
	if err != nil {
		return
	}

	result, err = d.Invoke(id, DISPATCH_METHOD, params)
	return
}
488793
func (mock *AuditorServiceMock) RecordCalls() []struct {
	Ctx    context.Context
	Action string
	Result string
	Params common.Params
} {
	var calls []struct {
		Ctx    context.Context
		Action string
		Result string
		Params common.Params
	}
	lockMockAuditorRecord.RLock()
	calls = mock.calls.Record
	lockMockAuditorRecord.RUnlock()
	return calls
}
254219
func (p *ExtensionClient) Call(ctx context.Context, registry string, item string, request ExtensionPluginRequest) (r *ExtensionResponse, err error) {
  var _args5 ExtensionCallArgs
  _args5.Registry = registry
  _args5.Item = item
  _args5.Request = request
  var _result6 ExtensionCallResult
  if err = p.Client_().Call(ctx, "call", &_args5, &_result6); err != nil {
    return
  }
  return _result6.GetSuccess(), nil
}
425679
func (v *MrbValue) Call(method string, args ...Value) (*MrbValue, error) {
	return v.call(method, args, nil)
}
337325
func (c *Client) Call(procedure string, args []interface{}, kwargs map[string]interface{}) (*Result, error) {
	id := NewID()
	c.registerListener(id)

	call := &Call{
		Request:     id,
		Procedure:   URI(procedure),
		Options:     make(map[string]interface{}),
		Arguments:   args,
		ArgumentsKw: kwargs,
	}
	if err := c.Send(call); err != nil {
		return nil, err
	}

	// wait to receive RESULT message
	msg, err := c.waitOnListener(id)
	if err != nil {
		return nil, err
	} else if e, ok := msg.(*Error); ok {
		return nil, fmt.Errorf("error calling procedure '%v': %v", procedure, e.Error)
	} else if result, ok := msg.(*Result); !ok {
		return nil, fmt.Errorf(formatUnexpectedMessage(msg, RESULT))
	} else {
		return result, nil
	}
}
1148050
func (w *clientWrapper) Call(
	ctx context.Context,
	req client.Request,
	rsp interface{},
	opts ...client.CallOption) (err error) {
	t := newRequestTracker(req, ClientProfile)
	ctx = t.start(ctx, true)

	defer func() { t.end(ctx, err) }()

	ctx = injectTraceIntoCtx(ctx, t.span)

	err = w.Client.Call(ctx, req, rsp, opts...)
	return
}
1068048
func call(c context.Context, client *prpc.Client, req *request, out io.Writer) error {
	var inf, outf prpc.Format
	var message []byte
	switch req.format {

	default:
		var buf bytes.Buffer
		if _, err := buf.ReadFrom(req.message); err != nil {
			return err
		}
		message = buf.Bytes()
		inf = req.format.Format()
		outf = inf
	}

	// Send the request.
	var hmd, tmd metadata.MD
	res, err := client.CallRaw(c, req.service, req.method, message, inf, outf, prpc.Header(&hmd), prpc.Trailer(&tmd))
	if err != nil {
		return &exitCode{err, int(grpc.Code(err))}
	}

	// Read response.
	if _, err := out.Write(res); err != nil {
		return fmt.Errorf("failed to write response: %s", err)
	}
	return err
}
1193257
func (scheduler *LatchesScheduler) UnLock(lock *Lock) {
	scheduler.RLock()
	defer scheduler.RUnlock()
	if !scheduler.closed {
		scheduler.unlockCh <- lock
	}
}
476150
func (m *Manager) Run() error {
	m.mu.Lock()
	alreadyStarted := m.started
	m.started = true
	stateCh := m.stateCh
	m.mu.Unlock()

	// Protect against multiple Run calls.
	if alreadyStarted {
		return ErrStarted
	}

	// Protect against being run after Close.
	if stateCh == nil {
		return ErrStopped
	}

	// Register for notifications about state changes
	m.State.Notify(stateCh)
	defer m.State.StopNotify(stateCh)

	for {
		m.syncState()

		// Wait for a state change
		_, ok := <-stateCh
		if !ok {
			// Stopped
			return nil
		}
	}
}
816843
func GoSilentCall(title string, fx func(), cb func(interface{})) {
	go SilentRecoveryHandlerCallback(title, func() error {
		fx()
		return nil
	}, cb)
}
1003374
func (o *Outbound) Call(ctx context.Context, request *transport.Request) (*transport.Response, error) {
	if request == nil {
		return nil, yarpcerrors.InvalidArgumentErrorf("request for grpc outbound was nil")
	}
	if err := o.once.WaitUntilRunning(ctx); err != nil {
		return nil, intyarpcerrors.AnnotateWithInfo(yarpcerrors.FromError(err), "error waiting for grpc outbound to start for service: %s", request.Service)
	}
	start := time.Now()

	var responseBody []byte
	var responseMD metadata.MD
	invokeErr := o.invoke(ctx, request, &responseBody, &responseMD, start)

	responseHeaders, err := getApplicationHeaders(responseMD)
	if err != nil {
		return nil, err
	}
	return &transport.Response{
		Body:             ioutil.NopCloser(bytes.NewBuffer(responseBody)),
		Headers:          responseHeaders,
		ApplicationError: metadataToIsApplicationError(responseMD),
	}, invokeErr
}
52093
func (ie *InitEvent) call() {
	log.Debug("OnInit callbacks executing")
	defer log.Debug("OnInit callbacks finished")
	for _, ev := range *ie {
		ev()
	}
}
88386
func (o *Outbound) Call(ctx context.Context, treq *transport.Request) (*transport.Response, error) {
	if treq == nil {
		return nil, yarpcerrors.InvalidArgumentErrorf("request for http unary outbound was nil")
	}

	return o.call(ctx, treq)
}
793909
func (_ENSRegistry *ENSRegistryRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
	return _ENSRegistry.Contract.ENSRegistryCaller.contract.Call(opts, result, method, params...)
}