endRefresh releases the refresh guard only if the token matches the current value. If the token doesn't match (stale callback from a superseded refresh), this is a no-op.
(token uint64)
| 120 | // endRefresh releases the refresh guard only if the token matches the current value. |
| 121 | // If the token doesn't match (stale callback from a superseded refresh), this is a no-op. |
| 122 | func (a *App) endRefresh(token uint64) { |
| 123 | a.refreshGen.CompareAndSwap(token, 0) |
| 124 | } |
| 125 | |
| 126 | // isRefreshActive returns true if a refresh is currently in progress. |
| 127 | func (a *App) isRefreshActive() bool { |
no outgoing calls
no test coverage detected