Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for mu (0.16 sec)

  1. internal/lsync/lrwmutex.go

    	const isWriteLock = false
    	return lm.lockLoop(ctx, id, source, timeout, isWriteLock)
    }
    
    func (lm *LRWMutex) lock(id, source string, isWriteLock bool) (locked bool) {
    	lm.mu.Lock()
    	defer lm.mu.Unlock()
    
    	lm.id = id
    	lm.source = source
    	if isWriteLock {
    		if lm.ref == 0 && !lm.isWriteLock {
    			lm.ref = 1
    			lm.isWriteLock = true
    			locked = true
    		}
    	} else {
    		if !lm.isWriteLock {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/ztunnelserver.go

    	latestConn    *ZtunnelConnection
    	mu            sync.Mutex
    }
    
    func (c *connMgr) addConn(conn *ZtunnelConnection) {
    	log.Debug("ztunnel connected")
    	c.mu.Lock()
    	defer c.mu.Unlock()
    	c.connectionSet[conn] = struct{}{}
    	c.latestConn = conn
    	ztunnelConnected.RecordInt(int64(len(c.connectionSet)))
    }
    
    func (c *connMgr) LatestConn() *ZtunnelConnection {
    	c.mu.Lock()
    	defer c.mu.Unlock()
    	return c.latestConn
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  3. cni/pkg/log/uds.go

    			continue
    		}
    		msg.Msg = strings.TrimSpace(msg.Msg)
    		messages = append(messages, msg)
    	}
    	// Lock log message printing to prevent log messages from different CNI
    	// processes interleave.
    	l.mu.Lock()
    	defer l.mu.Unlock()
    	for _, m := range messages {
    		// There is no fatal log from CNI plugin
    		switch m.Level {
    		case "debug":
    			pluginLog.LogWithTime(log.DebugLevel, m.Msg, m.Time)
    		case "info":
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Nov 29 01:05:12 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  4. cmd/metacache-server-pool.go

    			go func(i int, set *erasureObjects) {
    				defer wg.Done()
    				err := set.listPath(listCtx, o, innerResults)
    				mu.Lock()
    				defer mu.Unlock()
    				if err == nil {
    					allAtEOF = false
    				}
    				errs[i] = err
    			}(len(errs), set)
    			errs = append(errs, nil)
    		}
    	}
    	mu.Unlock()
    
    	// Gather results to a single channel.
    	// Quorum is one since we are merging across sets.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  5. cmd/bucket-lifecycle.go

    		return nil
    	}
    	workers := *w
    	return workers[h%uint64(len(workers))]
    }
    
    func (es *expiryState) ResizeWorkers(n int) {
    	// Lock to avoid multiple resizes to happen at the same time.
    	es.mu.Lock()
    	defer es.mu.Unlock()
    	var workers []chan expiryOp
    	if v := es.workers.Load(); v != nil {
    		// Copy to new array.
    		workers = append(workers, *v...)
    	}
    
    	if n == len(workers) || n < 1 {
    		return
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  6. cmd/untar.go

    type disconnectReader struct {
    	r  io.Reader
    	mu sync.Mutex
    }
    
    func (d *disconnectReader) Read(p []byte) (n int, err error) {
    	d.mu.Lock()
    	defer d.mu.Unlock()
    	if d.r != nil {
    		return d.r.Read(p)
    	}
    	return 0, errors.New("reader closed")
    }
    
    func (d *disconnectReader) Close() error {
    	d.mu.Lock()
    	d.r = nil
    	d.mu.Unlock()
    	return nil
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6K bytes
    - Viewed (0)
  7. cmd/bootstrap-peer-server.go

    	var incorrectConfigs []error
    	var retries int
    	var mu sync.Mutex
    	for onlineServers < len(clnts)/2 {
    		var wg sync.WaitGroup
    		wg.Add(len(clnts))
    		onlineServers = 0
    		for _, clnt := range clnts {
    			go func(clnt *bootstrapRESTClient) {
    				defer wg.Done()
    
    				if clnt.gridConn.State() != grid.StateConnected {
    					mu.Lock()
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  8. cmd/erasure-common.go

    				//   unformatted or simply not accessible for some reason.
    				//
    				// - Do not consume disks which are being healed
    				//
    				// - Future: skip busy disks
    				return
    			}
    
    			mu.Lock()
    			newDisks = append(newDisks, disks[i])
    			mu.Unlock()
    		}()
    	}
    	wg.Wait()
    	return newDisks
    }
    
    func (er erasureObjects) getOnlineLocalDisks() (newDisks []StorageAPI) {
    	disks := er.getOnlineDisks()
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  9. cmd/metacache-manager.go

    	// Return a transient bucket for invalid or system buckets.
    	m.mu.RLock()
    	b, ok := m.buckets[bucket]
    	if ok {
    		m.mu.RUnlock()
    		if b.bucket != bucket {
    			logger.Info("getBucket: cached bucket %s does not match this bucket %s", b.bucket, bucket)
    			debug.PrintStack()
    		}
    		return b
    	}
    
    	m.mu.RUnlock()
    	m.mu.Lock()
    	defer m.mu.Unlock()
    	// See if someone else fetched it while we waited for the lock.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Oct 25 00:44:15 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  10. cmd/handler-api.go

    }
    
    func (t *apiConfig) odirectEnabled() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.enableODirect
    }
    
    func (t *apiConfig) shouldGzipObjects() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.gzipObjects
    }
    
    func (t *apiConfig) permitRootAccess() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.rootAccess
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 08 09:22:27 GMT 2024
    - 10K bytes
    - Viewed (0)
Back to top