- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 640 for defer (0.02 sec)
-
internal/dsync/drwmutex.go
ctx, cancel := context.WithCancel(context.Background()) dm.m.Lock() dm.cancelRefresh = cancel dm.m.Unlock() go func() { defer cancel() refreshTimer := time.NewTimer(dm.refreshInterval) defer refreshTimer.Stop() for { select { case <-ctx.Done(): return case <-refreshTimer.C: noQuorum, err := refreshLock(ctx, dm.clnt, id, source, quorum)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 15:49:49 UTC 2024 - 20.4K bytes - Viewed (0) -
cmd/benchmark-utils_test.go
ctx, cancel := context.WithCancel(context.Background()) defer cancel() objLayer, disks, err := prepareTestBackend(ctx, instanceType) if err != nil { b.Fatalf("Failed obtaining Temp Backend: <ERROR> %s", err) } // cleaning up the backend by removing all the directories and files created on function return. defer removeRoots(disks) // uses *testing.B and the object Layer to run the benchmark.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Dec 23 15:46:00 UTC 2022 - 8.2K bytes - Viewed (0) -
cmd/admin-handlers_test.go
func testServicesCmdHandler(cmd cmdType, t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() adminTestBed, err := prepareAdminErasureTestBed(ctx) if err != nil { t.Fatal("Failed to initialize a single node Erasure backend for admin handler tests.", err) } defer adminTestBed.TearDown() // Initialize admin peers to make admin RPC calls. Note: In a
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 13.9K bytes - Viewed (0) -
internal/logger/targets.go
return &targetsList{} } func (tl *targetsList) get() []Target { tl.mu.RLock() defer tl.mu.RUnlock() return tl.list } func (tl *targetsList) add(t Target) { tl.mu.Lock() defer tl.mu.Unlock() tl.list = append(tl.list, t) } func (tl *targetsList) set(tgts []Target) { tl.mu.Lock() defer tl.mu.Unlock() tl.list = tgts } var (
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jun 03 15:44:50 UTC 2024 - 6K bytes - Viewed (0) -
internal/ioutil/ioutil_test.go
func TestCopyAligned(t *testing.T) { f, err := os.CreateTemp("", "") if err != nil { t.Errorf("Error creating tmp file: %v", err) } defer f.Close() defer os.Remove(f.Name()) r := strings.NewReader("hello world") bufp := ODirectPoolSmall.Get().(*[]byte) defer ODirectPoolSmall.Put(bufp) written, err := CopyAligned(f, io.LimitReader(r, 5), *bufp, r.Size(), f) if !errors.Is(err, io.ErrUnexpectedEOF) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 22 23:07:14 UTC 2024 - 5.5K bytes - Viewed (0) -
internal/ioutil/read_file.go
// as an error to be reported. func ReadFileWithFileInfo(name string) ([]byte, fs.FileInfo, error) { f, err := OsOpenFile(name, readMode, 0o666) if err != nil { return nil, nil, err } defer f.Close() st, err := f.Stat() if err != nil { return nil, nil, err } dst := make([]byte, st.Size()) _, err = io.ReadFull(f, dst) return dst, st, err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Dec 09 18:17:51 UTC 2023 - 2.3K bytes - Viewed (0) -
internal/config/identity/plugin/config.go
currentMinute serviceRTTMinuteStats } func (h *metrics) setConnSuccess(reqStartTime time.Time) { h.Lock() defer h.Unlock() h.LastCheckSuccess = reqStartTime } func (h *metrics) setConnFailure(reqStartTime time.Time) { h.Lock() defer h.Unlock() h.LastCheckFailure = reqStartTime } func (h *metrics) updateLastFullMinute(currReqMinute time.Time) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 13.3K bytes - Viewed (0) -
internal/config/callhome/callhome.go
// Enabled - indicates if callhome is enabled or not func (c *Config) Enabled() bool { configLock.RLock() defer configLock.RUnlock() return c.Enable } // FrequencyDur - returns the currently configured callhome frequency func (c *Config) FrequencyDur() time.Duration { configLock.RLock() defer configLock.RUnlock() if c.Frequency == 0 { return callhomeCycleDefault } return c.Frequency }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 2.6K bytes - Viewed (0) -
cmd/http-stats.go
s.Lock() defer s.Unlock() stats, ok := s.stats[bucket] if !ok { stats = &bucketS3RXTX{ s3InputBytes: uint64(n), } } else { stats.s3InputBytes += uint64(n) } s.stats[bucket] = stats } // Increase S3 total output bytes for input bucket func (s *bucketConnStats) incS3OutputBytes(bucket string, n int64) { s.Lock() defer s.Unlock() stats, ok := s.stats[bucket]
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 17:13:00 UTC 2024 - 11.4K bytes - Viewed (0) -
internal/deadlineconn/deadlineconn_test.go
if err != nil { t.Fatalf("unable to create listener. %v", err) } defer l.Close() serverAddr := l.Addr().String() tcpListener, ok := l.(*net.TCPListener) if !ok { t.Fatalf("failed to assert to net.TCPListener") } var wg sync.WaitGroup wg.Add(1) go func() { defer wg.Done() tcpConn, terr := tcpListener.AcceptTCP() if terr != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Nov 05 18:09:21 UTC 2022 - 3K bytes - Viewed (0)