MCPcopy Create free account
hub / github.com/erpc/erpc / applyRefreshResult

Method applyRefreshResult

data/shared_state_variable.go:492–502  ·  view source on GitHub ↗
(initialVal int64, r refreshResult)

Source from the content-addressed store, hash-verified

490}
491
492func (c *counterInt64) applyRefreshResult(initialVal int64, r refreshResult) (int64, error) {
493 if r.err != nil {
494 c.markFreshAttempt()
495 return initialVal, r.err
496 }
497 updated := c.processNewValue(UpdateSourceTryUpdateIfStale, r.val)
498 if updated {
499 c.scheduleBackgroundPushCurrent()
500 }
501 return c.value.Load(), nil
502}
503
504func (c *counterInt64) continueAsyncRefresh(resultCh <-chan refreshResult) {
505 go func() {

Callers 2

TryUpdateIfStaleMethod · 0.95
continueAsyncRefreshMethod · 0.95

Calls 4

markFreshAttemptMethod · 0.95
processNewValueMethod · 0.95
LoadMethod · 0.80

Tested by

no test coverage detected