- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for Swap (0.17 sec)
-
cmd/service.go
globalServiceFreezeMu.Lock() // Close when we reach 0 globalServiceFreezeCnt-- if globalServiceFreezeCnt <= 0 { // Set to a nil channel. var _ch chan struct{} if val := globalServiceFreeze.Swap(_ch); val != nil { if ch, ok := val.(chan struct{}); ok && ch != nil { // Close previous non-nil channel. xioutil.SafeClose(ch) } } globalServiceFreezeCnt = 0 // Don't risk going negative. }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Wed Feb 28 07:02:14 GMT 2024 - 3.8K bytes - Viewed (0) -
internal/logger/logger.go
func uniq(data sort.Interface) (size int) { p, l := 0, data.Len() if l <= 1 { return l } for i := 1; i < l; i++ { if !data.Less(p, i) { continue } p++ if p < i { data.Swap(p, i) } } return p + 1 } // Remove any duplicates and return unique entries. func uniqueEntries(paths []string) []string { sort.Strings(paths) n := uniq(sort.StringSlice(paths))
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 12.2K bytes - Viewed (0) -
internal/logger/target/testlogger/testlogger.go
// Call the returned function to disable logging. func (t *testLogger) SetFatalTB(tb testing.TB) func() { return t.setTB(tb, fatalMessage) } func (t *testLogger) setTB(tb testing.TB, action int32) func() { old := t.action.Swap(action) t.current.Store(&tb) return func() { t.current.Store(nil) t.action.Store(old) } } func (t *testLogger) String() string { tb := t.current.Load() if tb != nil { tbb := *tb
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Tue Nov 21 01:09:35 GMT 2023 - 4K bytes - Viewed (0) -
cmd/xl-storage-disk-id-check.go
// alloc on every call, so we have a clean entry to swap in. t := time.Now().Unix() e.init.Do(func() { e.cached.Store(&AccElem{}) atomic.StoreInt64(&e.cachedSec, t) }) acc := e.cached.Load() if lastT := atomic.LoadInt64(&e.cachedSec); lastT != t { // Check if lastT was changed by someone else. if atomic.CompareAndSwapInt64(&e.cachedSec, lastT, t) { // Now we swap in a new. newAcc := &AccElem{}
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sun Apr 28 17:53:50 GMT 2024 - 33K bytes - Viewed (0) -
cmd/metacache-entries_test.go
"time" ) func Test_metaCacheEntries_sort(t *testing.T) { entries := loadMetacacheSampleEntries(t) o := entries.entries() if !o.isSorted() { t.Fatal("Expected sorted objects") } // Swap first and last o[0], o[len(o)-1] = o[len(o)-1], o[0] if o.isSorted() { t.Fatal("Expected unsorted objects") } sorted := o.sort() if !o.isSorted() { t.Fatal("Expected sorted o objects") }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sun Jan 02 17:15:06 GMT 2022 - 31.6K bytes - Viewed (0) -
cmd/bucket-targets.go
epHealth.offlineDuration = prev.offlineDuration epHealth.lastHCAt = prev.lastHCAt epHealth.latency = prev.latency } m[t.Endpoint] = epHealth } } // swap out the map sys.hc = m sys.hMutex.Unlock() } func (sys *BucketTargetSys) healthStats() map[string]epHealth { sys.hMutex.RLock() defer sys.hMutex.RUnlock() m := make(map[string]epHealth, len(sys.hc))
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 20.9K bytes - Viewed (0) -
internal/s3select/sql/value.go
a.setBool(bA) } else { return fmt.Errorf("Could not convert %s to a boolean", a.String()) } default: return errCmpMismatchedTypes } return nil case !okA && okB: // swap arguments to avoid repeating code return inferTypesForCmp(b, a) default: // Does not happen return nil } } // Value arithmetic functions: we do not expose them outside the
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Fri Feb 25 20:31:19 GMT 2022 - 20.2K bytes - Viewed (0) -
src/cmd/asm/internal/asm/parse.go
// was AX:DX, for which the new syntax is DX, AX. Note the reordering. if tok == '\n' || tok == ';' || (nesting == 0 && (tok == ',' || tok == ':')) { if tok == ':' { // Remember this location so we can swap the operands below. if colon >= 0 { p.errorf("invalid ':' in operand") return word, cond, operands, true } colon = len(operands) } break }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Feb 21 14:34:57 GMT 2024 - 36.9K bytes - Viewed (0)