Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for SafeClose (0.17 sec)

  1. internal/grid/muxserver.go

    }
    
    func (m *muxServer) close() {
    	m.cancel()
    	m.recvMu.Lock()
    	defer m.recvMu.Unlock()
    
    	if m.inbound != nil {
    		xioutil.SafeClose(m.inbound)
    		m.inbound = nil
    	}
    
    	if m.outBlock != nil {
    		xioutil.SafeClose(m.outBlock)
    		m.outBlock = nil
    
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  2. internal/grid/debug.go

    		res.Managers = append(res.Managers, manager)
    		res.Servers = append(res.Servers, startHTTPServer(listeners[i], m))
    		res.Listeners = append(res.Listeners, listeners[i])
    		res.Mux = append(res.Mux, m)
    	}
    	xioutil.SafeClose(ready)
    	for _, m := range res.Managers {
    		for _, remote := range m.Targets() {
    			if err := m.Connection(remote).WaitForConnect(ctx); err != nil {
    				return nil, err
    			}
    		}
    	}
    	return &res, nil
    }
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 08 18:15:27 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  3. internal/store/store.go

    // replayItems - Reads the items from the store and replays.
    func replayItems[I any](store Store[I], doneCh <-chan struct{}, log logger, id string) <-chan Key {
    	keyCh := make(chan Key)
    
    	go func() {
    		defer xioutil.SafeClose(keyCh)
    
    		retryTicker := time.NewTicker(retryInterval)
    		defer retryTicker.Stop()
    
    		for {
    			names, err := store.List()
    			if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 25 16:44:20 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  4. cmd/service.go

    		// 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.
    	}
    	globalServiceFreezeMu.Unlock()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Feb 28 07:02:14 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  5. cmd/speedtest.go

    }
    
    // Get the max throughput and iops numbers.
    func objectSpeedTest(ctx context.Context, opts speedTestOpts) chan madmin.SpeedTestResult {
    	ch := make(chan madmin.SpeedTestResult, 1)
    	go func() {
    		defer xioutil.SafeClose(ch)
    
    		concurrency := opts.concurrencyStart
    
    		if opts.autotune {
    			// if we have less drives than concurrency then choose
    			// only the concurrency to be number of drives to start
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 28 18:04:17 GMT 2024
    - 9K bytes
    - Viewed (0)
  6. cmd/erasure-decode.go

    	if p.offset+p.shardSize > p.shardFileSize {
    		p.shardSize = p.shardFileSize - p.offset
    	}
    	if p.shardSize == 0 {
    		return newBuf, nil
    	}
    
    	readTriggerCh := make(chan bool, len(p.readers))
    	defer xioutil.SafeClose(readTriggerCh) // close the channel upon return
    
    	for i := 0; i < p.dataBlocks; i++ {
    		// Setup read triggers for p.dataBlocks number of reads so that it reads in parallel.
    		readTriggerCh <- true
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 9.4K bytes
    - Viewed (0)
Back to top