Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 47 for mu (0.77 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. 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)
  3. 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)
  4. 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)
  5. tensorflow/c/c_api_internal.h

    };
    
    struct TF_Graph {
      TF_Graph();
    
      mutable tensorflow::mutex mu;
      tensorflow::Graph graph TF_GUARDED_BY(mu);
    
      // Runs shape inference.
      tensorflow::ShapeRefiner refiner TF_GUARDED_BY(mu);
    
      // Maps from name of an operation to the Node* in 'graph'.
      std::unordered_map<tensorflow::string, tensorflow::Node*> name_map
          TF_GUARDED_BY(mu);
    
      // The keys of this map are all the active sessions using this graph. Each
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Sat May 13 00:49:12 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top