Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for mu (0.14 sec)

  1. 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)
  2. cni/pkg/nodeagent/pod_cache.go

    func (p *podNetnsCache) Get(uid string) Netns {
    	// lock current snapshot pod map
    	p.mu.RLock()
    	defer p.mu.RUnlock()
    	if info, f := p.currentPodCache[uid]; f {
    		return info.Netns
    	}
    	return nil
    }
    
    // make sure uid is in the cache, even if we don't have a netns
    func (p *podNetnsCache) Ensure(uid string) {
    	p.mu.Lock()
    	defer p.mu.Unlock()
    	if _, ok := p.currentPodCache[uid]; !ok {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.5K 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/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)
  5. 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)
  6. 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)
  7. tensorflow/c/c_api_function.cc

    }
    
    int TF_GraphNumFunctions(TF_Graph* g) {
      tensorflow::mutex_lock l(g->mu);
      return g->graph.flib_def().num_functions();
    }
    
    int TF_GraphGetFunctions(TF_Graph* g, TF_Function** funcs, int max_func,
                             TF_Status* status) {
      tensorflow::FunctionDefLibrary lib;
      {
        tensorflow::mutex_lock l(g->mu);
        lib = g->graph.flib_def().ToProto();
      }
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 13.6K bytes
    - Viewed (2)
  8. cmd/ilm-config.go

    		ExpirationWorkers: 100,
    		TransitionWorkers: 100,
    	},
    }
    
    type ilmConfig struct {
    	mu  sync.RWMutex
    	cfg ilm.Config
    }
    
    func (c *ilmConfig) getExpirationWorkers() int {
    	c.mu.RLock()
    	defer c.mu.RUnlock()
    
    	return c.cfg.ExpirationWorkers
    }
    
    func (c *ilmConfig) getTransitionWorkers() int {
    	c.mu.RLock()
    	defer c.mu.RUnlock()
    
    	return c.cfg.TransitionWorkers
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Mar 05 02:50:24 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  9. cmd/background-newdisks-heal-ops.go

    	return h
    }
    
    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
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  10. cmd/metacache-bucket.go

    		debug.PrintStack()
    		return metacache{}
    	}
    
    	// Grab a write lock, since we create one if we cannot find one.
    	b.mu.Lock()
    	defer b.mu.Unlock()
    
    	// Check if exists already.
    	if c, ok := b.caches[o.ID]; ok {
    		c.lastHandout = time.Now()
    		b.caches[o.ID] = c
    		b.debugf("returning existing %v", o.ID)
    		return c
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.6K bytes
    - Viewed (0)
Back to top