// Called just once after solving has finished, whether success or not
439131
func (s *solver) traceFinish(sol solution, err error) {
	if s.tl == nil {
		return
	}

	if err == nil {
		var pkgcount int
		for _, lp := range sol.Projects() {
			pkgcount += len(lp.pkgs)
		}
		s.tl.Printf("%s%s found solution with %v packages from %v projects", innerIndent, successChar, pkgcount, len(sol.Projects()))
	} else {
		s.tl.Printf("%s%s solving failed", innerIndent, failChar)
	}
}
86065
func (s Suite) After(f func(*testing.T)) bool {
	return s("", func(t *testing.T, _ G, _ S) {
		t.Helper()
		f(t)
	}, func(c *config) { c.after = true })
}
195382
func (fc *FakeClock) AfterFunc(d time.Duration, f func()) Timer {
	return fc.FakeAfterFunc(d, f)
}
888696
func (engine *Engine) After(closures func(interface{})) *Session {
	session := engine.NewSession()
	session.IsAutoClose = true
	return session.After(closures)
}
755584
func NewExecutionFinished(result *JsonResult) *Execution {
	return &Execution{
		Data: &Execution_Data{
			ExecutionType: &Execution_Data_Finished_{
				&Execution_Data_Finished{Data: result}}}}
}
235611
func (RealClock) AfterFunc(d time.Duration, f func()) Timer {
	return &realTimer{time.AfterFunc(d, f)}
}
48685
func (i *FuncInterceptor) AfterDecision(decision *swf.PollForDecisionTaskOutput, ctx *FSMContext, outcome *Outcome) {
	if i.AfterDecisionFn != nil {
		i.AfterDecisionFn(decision, ctx, outcome)
	}
}
423481
func (r Rule) Once() Rule {
	if r == nil {
		return nil
	}
	var once sync.Once
	return func(ctx context.Context, e *scheduler.Event, err error, ch Chain) (context.Context, *scheduler.Event, error) {
		ruleInvoked := false
		once.Do(func() {
			ctx, e, err = r(ctx, e, err, ch)
			ruleInvoked = true
		})
		if !ruleInvoked {
			ctx, e, err = ch(ctx, e, err)
		}
		return ctx, e, err
	}
}
630533
func afterCreateCallback(scope *Scope) {
	if !scope.HasError() {
		scope.CallMethod("AfterCreate")
	}
	if !scope.HasError() {
		scope.CallMethod("AfterSave")
	}
}
562332
func (d *decoder) finished() bool {
	return d.br.finished() && d.dt[d.state].nbBits > 0
}
560077
func (so *SpanObserver) OnFinish(options opentracing.FinishOptions) {
	so.mux.Lock()
	defer so.mux.Unlock()

	if so.operationName == "" || so.kind != Inbound {
		return
	}

	mets := so.metricsByEndpoint.get(so.operationName)
	latency := options.FinishTime.Sub(so.startTime)
	if so.err {
		mets.RequestCountFailures.Inc(1)
		mets.RequestLatencyFailures.Record(latency)
	} else {
		mets.RequestCountSuccess.Inc(1)
		mets.RequestLatencySuccess.Record(latency)
	}
	mets.recordHTTPStatusCode(so.httpStatusCode)
}
249845
func (cp *CallbackProcessor) After(callbackName string) *CallbackProcessor {
	cp.after = callbackName
	return cp
}
1146607
func (q *lockBasedQueryExecutor) Done() {
	logger.Debugf("Done with transaction simulation / query execution [%s]", q.txid)
	q.helper.done()
}
99029
func WaitForResume() chan struct{} {
	ch := make(chan struct{})
	var wg sync.WaitGroup
	wg.Add(1)
	go func() {
		ticker := time.NewTicker(10 * time.Millisecond)
		t := time.Now()
		wg.Done()
		for {
			now := <-ticker.C
			if now.Sub(t) > 100*time.Millisecond {
				break
			}
			t = now
		}
		ticker.Stop()
		ch <- struct{}{}
	}()
	wg.Wait()
	return ch
}
1269893
func (w *FreqProxTermsWriterPerField) finish() error {
	err := w.TermsHashPerFieldImpl.finish()
	if err == nil && w.sawPayloads {
		panic("not implemented yet")
		// w.fieldInfo.SetStorePayloads()
	}
	return err
}
573695
func (s *TasksGetTaskService) WaitForCompletion(waitForCompletion bool) *TasksGetTaskService {
	s.waitForCompletion = &waitForCompletion
	return s
}
618367
func (r *FileRef) OnAfterClose(cb func()) {
	r.m.Lock()
	r.afterCloseCallbacks = append(r.afterCloseCallbacks, cb)
	r.m.Unlock()
}