- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 175 for defer (0.03 sec)
-
cmd/storage-rest-client.go
defer xhttp.DrainBody(respBody) if err != nil { return err } _, err = waitForHTTPResponse(respBody) return toStorageErr(err) } func (client *storageRESTClient) WriteMetadata(ctx context.Context, origvolume, volume, path string, fi FileInfo) error { ctx, cancel := context.WithTimeout(ctx, globalDriveConfig.GetMaxTimeout()) defer cancel()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Oct 13 13:07:21 UTC 2024 - 30.2K bytes - Viewed (0) -
internal/store/queuestore.go
return } // Del - Deletes an entry from the store. func (store *QueueStore[_]) Del(key Key) error { store.Lock() defer store.Unlock() return store.del(key) } // Len returns the entry count. func (store *QueueStore[_]) Len() int { store.RLock() l := len(store.entries) defer store.RUnlock() return l } // lockless call func (store *QueueStore[_]) del(key Key) error {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 8.6K bytes - Viewed (0) -
internal/store/batch_test.go
CommitTimeout: 5 * time.Minute, Log: func(ctx context.Context, err error, id string, errKind ...interface{}) { t.Log(err) }, }) defer batch.Close() var wg sync.WaitGroup for i := 0; i < int(limit); i++ { wg.Add(1) go func(key int) { defer wg.Done() if err := batch.Add(testItem); err != nil { t.Errorf("failed to add item %v; %v", key, err) return } }(i) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 5.6K bytes - Viewed (0) -
cmd/untar.go
if err != nil { return err } defer gz.Close() r = gz case formatS2: r = s2.NewReader(bf) case formatZstd: // Limit to 16 MiB per stream. dec, err := zstd.NewReader(bf, zstd.WithDecoderMaxWindow(16<<20)) if err != nil { return err } defer dec.Close() r = dec case formatBZ2: ctx, cancel := context.WithCancel(ctx) defer cancel()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 22 00:33:43 UTC 2024 - 6K bytes - Viewed (2) -
cmd/xl-storage-disk-id-check.go
if err != nil { return nil, err } defer done(0, &err) return p.storage.ListVols(ctx) } func (p *xlStorageDiskIDCheck) StatVol(ctx context.Context, volume string) (vol VolInfo, err error) { ctx, done, err := p.TrackDiskHealth(ctx, storageMetricStatVol, volume) if err != nil { return vol, err } defer done(0, &err)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:56:26 UTC 2024 - 34.5K bytes - Viewed (0) -
cmd/background-newdisks-heal-ops.go
} func (h *healingTracker) getLastUpdate() time.Time { h.mu.RLock() defer h.mu.RUnlock() return h.LastUpdate } func (h *healingTracker) getBucket() string { h.mu.RLock() defer h.mu.RUnlock() return h.Bucket } func (h *healingTracker) setBucket(bucket string) { h.mu.Lock() defer h.mu.Unlock() h.Bucket = bucket }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:58:27 UTC 2024 - 16.6K bytes - Viewed (0) -
cmd/batch-handlers.go
if ri == nil { return } ri.mu.Lock() defer ri.mu.Unlock() if success { ri.Bucket = bucket ri.Object = info.Name } ri.countItem(info.Size, info.DeleteMarker, success, attempt) } func (ri *batchJobInfo) trackCurrentBucketBatch(bucket string, batch []ObjectInfo) { if ri == nil { return } ri.mu.Lock() defer ri.mu.Unlock() ri.Bucket = bucket
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 18 15:32:09 UTC 2024 - 62.2K bytes - Viewed (0) -
cmd/tier.go
} func (t *tierMetrics) logSuccess(tier string) { t.Lock() defer t.Unlock() stat := t.requestsCount[tier] stat.success++ t.requestsCount[tier] = stat } func (t *tierMetrics) logFailure(tier string) { t.Lock() defer t.Unlock() stat := t.requestsCount[tier] stat.failure++ t.requestsCount[tier] = stat } var (
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 12 20:44:05 UTC 2024 - 15.7K bytes - Viewed (0) -
tests/prepared_stmt_test.go
} loopCount := 100 var wg sync.WaitGroup var unexpectedError bool writerFinish := make(chan struct{}) wg.Add(1) go func(id uint) { defer wg.Done() defer close(writerFinish) for j := 0; j < loopCount; j++ { var tmp User err := tx.Session(&gorm.Session{}).First(&tmp, id).Error if err == nil || isUsingClosedConnError(err) { continue }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:02:05 UTC 2024 - 8.5K bytes - Viewed (0) -
cmd/admin-handlers.go
return } defer nsLock.Unlock(lkctx) healthCtx, healthCancel := context.WithTimeout(lkctx.Context(), deadline) defer healthCancel() go fetchHealthInfo(healthCtx, objectAPI, &query, healthInfoCh, healthInfo) setCommonHeaders(w) setEventStreamHeaders(w) w.WriteHeader(http.StatusOK) ticker := time.NewTicker(5 * time.Second) defer ticker.Stop() for { select {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 11:32:32 UTC 2024 - 99.7K bytes - Viewed (0)