MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / Set

Method Set

base/util.go:1242–1244  ·  view source on GitHub ↗

Set sets the value of the atomic int. Callers must ensure that invocations of this are protected by a mutex or are otherwise safe to call concurrently, since value can overwrite any previous value.

(value int64)

Source from the content-addressed store, hash-verified

1240
1241// Set sets the value of the atomic int. Callers must ensure that invocations of this are protected by a mutex or are otherwise safe to call concurrently, since value can overwrite any previous value.
1242func (ai *AtomicInt) Set(value int64) {
1243 atomic.StoreInt64(&ai.val, value)
1244}
1245
1246// SetIfMax sets the value of the atomic int to the given value if the given value is greater than the current value.
1247func (ai *AtomicInt) SetIfMax(value int64) {

Callers 15

GetClientMethod · 0.45
SetURLQueryParamFunction · 0.45
SaveMethod · 0.45
TestDeleteSessionFunction · 0.45
AuthenticateCookieMethod · 0.45
CreateSessionMethod · 0.45
EnableErrorLoggerFunction · 0.45
EnableWarnLoggerFunction · 0.45

Calls

no outgoing calls

Tested by 15

TestDeleteSessionFunction · 0.36
BenchmarkExpvarSetFunction · 0.36
BenchmarkNewStatSetFunction · 0.36
TestSetIfMaxFunction · 0.36
initExpvarBaseEquivalentFunction · 0.36
TestOneShotDCPFunction · 0.36
TestTerminateDCPFeedFunction · 0.36