Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for mu (0.41 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. 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/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/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. src/archive/zip/register.go

    }
    
    type pooledFlateWriter struct {
    	mu sync.Mutex // guards Close and Write
    	fw *flate.Writer
    }
    
    func (w *pooledFlateWriter) Write(p []byte) (n int, err error) {
    	w.mu.Lock()
    	defer w.mu.Unlock()
    	if w.fw == nil {
    		return 0, errors.New("Write after Close")
    	}
    	return w.fw.Write(p)
    }
    
    func (w *pooledFlateWriter) Close() error {
    	w.mu.Lock()
    	defer w.mu.Unlock()
    	var err error
    	if w.fw != nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 3.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