Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for SafeClose (0.16 sec)

  1. cmd/xl-storage-disk-id-check.go

    	if contextCanceled(ctx) {
    		xioutil.SafeClose(updates)
    		return dataUsageCache{}, ctx.Err()
    	}
    
    	if err := p.checkDiskStale(); err != nil {
    		xioutil.SafeClose(updates)
    		return dataUsageCache{}, err
    	}
    
    	weSleep := func() bool {
    		return scannerIdleMode.Load() == 0
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 33K bytes
    - Viewed (0)
  2. internal/grid/muxclient.go

    	defer m.respMu.Unlock()
    	if !m.closed {
    		m.respErr.Store(&err)
    		// Do not block.
    		select {
    		case respHandler <- Response{Err: err}:
    			xioutil.SafeClose(respHandler)
    		default:
    			go func() {
    				respHandler <- Response{Err: err}
    				xioutil.SafeClose(respHandler)
    			}()
    		}
    		gridLogIf(m.ctx, m.sendLocked(message{Op: OpDisconnectServerMux, MuxID: m.MuxID}))
    		m.closed = true
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  3. cmd/metacache-server-pool.go

    				returned = funcReturned
    				funcReturnedMu.Unlock()
    				outCh <- entry
    				if returned {
    					xioutil.SafeClose(outCh)
    				}
    			}
    			entry.reusable = returned
    			saveCh <- entry
    		}
    		if !returned {
    			xioutil.SafeClose(outCh)
    		}
    		xioutil.SafeClose(saveCh)
    	}()
    
    	return filteredResults()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  4. internal/grid/handlers.go

    		}
    		go func() {
    			defer xioutil.SafeClose(stream.Requests)
    			for req := range reqT {
    				b, err := req.MarshalMsg(GetByteBufferCap(req.Msgsize()))
    				if err != nil {
    					gridLogOnceIf(ctx, err, err.Error())
    				}
    				h.PutRequest(req)
    				stream.Requests <- b
    			}
    		}()
    	} else if stream.Requests != nil {
    		xioutil.SafeClose(stream.Requests)
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 27.1K bytes
    - Viewed (0)
  5. cmd/storage-rest-server.go

    func (c *closeNotifier) Read(p []byte) (n int, err error) {
    	n, err = c.rc.Read(p)
    	if err != nil {
    		if c.done != nil {
    			xioutil.SafeClose(c.done)
    			c.done = nil
    		}
    	}
    	return n, err
    }
    
    func (c *closeNotifier) Close() error {
    	if c.done != nil {
    		xioutil.SafeClose(c.done)
    		c.done = nil
    	}
    	return c.rc.Close()
    }
    
    // keepHTTPReqResponseAlive can be used to avoid timeouts with long storage
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  6. cmd/erasure-server-pool-rebalance.go

    	}
    	return false
    }
    
    func (z *erasureServerPools) rebalanceBuckets(ctx context.Context, poolIdx int) (err error) {
    	doneCh := make(chan error, 1)
    	defer xioutil.SafeClose(doneCh)
    
    	// Save rebalance.bin periodically.
    	go func() {
    		// Update rebalance.bin periodically once every 5-10s, chosen randomly
    		// to avoid multiple pool leaders herding to update around the same
    		// time.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 19:29:28 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  7. cmd/storage-rest-client.go

    	return nil
    }
    
    func (client *storageRESTClient) NSScanner(ctx context.Context, cache dataUsageCache, updates chan<- dataUsageEntry, scanMode madmin.HealScanMode, _ func() bool) (dataUsageCache, error) {
    	defer xioutil.SafeClose(updates)
    
    	st, err := storageNSScannerRPC.Call(ctx, client.gridConn, &nsScannerOptions{
    		DiskID:   *client.diskID.Load(),
    		ScanMode: int(scanMode),
    		Cache:    &cache,
    	})
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  8. cmd/batch-expire.go

    			ObjectInfo: result,
    		})
    	}
    	// Send any remaining objects downstream
    	if len(toDel) > 0 {
    		select {
    		case <-ctx.Done():
    		case expireCh <- toDel:
    		}
    	}
    	xioutil.SafeClose(expireCh)
    
    	<-expireDoneCh // waits for the expire goroutine to complete
    	wk.Wait()      // waits for all expire workers to retire
    
    	ri.Complete = ri.ObjectsFailed == 0
    	ri.Failed = ri.ObjectsFailed > 0
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 21K bytes
    - Viewed (1)
  9. internal/logger/target/kafka/kafka.go

    		h.storeCtxCancel()
    	}
    
    	// Set logch to nil and close it.
    	// This will block all Send operations,
    	// and finish the existing ones.
    	// All future ones will be discarded.
    	h.logChMu.Lock()
    	xioutil.SafeClose(h.logCh)
    	h.logCh = nil
    	h.logChMu.Unlock()
    
    	if h.producer != nil {
    		h.producer.Close()
    		h.client.Close()
    	}
    
    	// Wait for messages to be sent...
    	h.wg.Wait()
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 10.1K bytes
    - Viewed (1)
  10. cmd/admin-heal-ops.go

    // two objects.
    func (h *healSequence) traverseAndHeal(objAPI ObjectLayer) {
    	bucketsOnly := false // Heals buckets and objects also.
    	h.traverseAndHealDoneCh <- h.healItems(objAPI, bucketsOnly)
    	xioutil.SafeClose(h.traverseAndHealDoneCh)
    }
    
    // healMinioSysMeta - heals all files under a given meta prefix, returns a function
    // which in-turn heals the respective meta directory path and any files in int.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 25.1K bytes
    - Viewed (1)
Back to top