Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 166 for Unlock (0.44 sec)

  1. cmd/metacache-bucket.go

    		logger.Info("bucketMetacache.findCache: bucket %s does not match this bucket %s", o.Bucket, b.bucket)
    		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 May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  2. internal/logger/logonce.go

    	if err == nil {
    		return
    	}
    
    	nerr := unwrapErrs(err)
    	l.Lock()
    	shouldLog := true
    	prev, ok := l.IDMap[id]
    	if !ok {
    		l.IDMap[id] = onceErr{
    			Err:   nerr,
    			Count: 1,
    		}
    	} else if prev.Err.Error() == nerr.Error() {
    		// if errors are equal do not log.
    		prev.Count++
    		l.IDMap[id] = prev
    		shouldLog = false
    	}
    	l.Unlock()
    
    	if shouldLog {
    		consoleLogIf(ctx, subsystem, err, errKind...)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  3. internal/config/lambda/target/lazyinit.go

    }
    
    func (l *lazyInit) Do(f func() error) error {
    	if atomic.LoadUint32(&l.done) == 0 {
    		return l.doSlow(f)
    	}
    	return nil
    }
    
    func (l *lazyInit) doSlow(f func() error) error {
    	l.m.Lock()
    	defer l.m.Unlock()
    	if atomic.LoadUint32(&l.done) == 0 {
    		if err := f(); err != nil {
    			return err
    		}
    		// Mark as done only when f() is successful
    		atomic.StoreUint32(&l.done, 1)
    	}
    	return nil
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 07 16:12:41 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  4. cmd/peer-rest-server.go

    	vars := mux.Vars(r)
    	profiles := strings.Split(vars[peerRESTProfiler], ",")
    	if len(profiles) == 0 {
    		s.writeErrorResponse(w, errors.New("profiler name is missing"))
    		return
    	}
    	globalProfilerMu.Lock()
    	defer globalProfilerMu.Unlock()
    	if globalProfiler == nil {
    		globalProfiler = make(map[string]minioProfiler, 10)
    	}
    
    	// Stop profiler of all types if already running
    	for k, v := range globalProfiler {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 51.8K bytes
    - Viewed (0)
  5. cmd/erasure-multipart.go

    	if opts.CheckPrecondFn != nil {
    		// Lock the object before reading.
    		lk := er.NewNSLock(bucket, object)
    		lkctx, err := lk.GetRLock(ctx, globalOperationTimeout)
    		if err != nil {
    			return nil, err
    		}
    		rctx := lkctx.Context()
    		obj, err := er.getObjectInfo(rctx, bucket, object, opts)
    		lk.RUnlock(lkctx)
    		if err != nil && !isErrVersionNotFound(err) && !isErrObjectNotFound(err) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 43K bytes
    - Viewed (0)
  6. internal/grid/muxserver.go

    }
    
    func (m *muxServer) send(msg message) {
    	m.sendMu.Lock()
    	defer m.sendMu.Unlock()
    	msg.MuxID = m.ID
    	msg.Seq = m.SendSeq
    	m.SendSeq++
    	if debugPrint {
    		fmt.Printf("Mux %d, Sending %+v\n", m.ID, msg)
    	}
    	gridLogIf(m.ctx, m.parent.queueMsg(msg, nil))
    }
    
    func (m *muxServer) close() {
    	m.cancel()
    	m.recvMu.Lock()
    	defer m.recvMu.Unlock()
    
    	if m.inbound != nil {
    		xioutil.SafeClose(m.inbound)
    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)
  7. internal/pubsub/pubsub_test.go

    		t.Fatalf("unexpected error: %v", err)
    	}
    	if err := ps.Subscribe(MaskAll, ch2, doneCh, nil); err != nil {
    		t.Fatalf("unexpected error: %v", err)
    	}
    	ps.Lock()
    	defer ps.Unlock()
    
    	if len(ps.subs) != 2 || ps.NumSubscribers(MaskAll) != 2 || ps.Subscribers() != 2 {
    		t.Fatalf("expected 2 subscribers")
    	}
    }
    
    func TestNumSubscribersMask(t *testing.T) {
    	ps := New[Maskable, Mask](2)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  8. internal/config/batch/batch.go

    func (opts Config) ExpirationWait() time.Duration {
    	configMu.RLock()
    	defer configMu.RUnlock()
    
    	return opts.ExpirationWorkersWait
    }
    
    // ReplicationWait returns the duration for which a batch replication worker
    // would wait before working on next object.
    func (opts Config) ReplicationWait() time.Duration {
    	configMu.RLock()
    	defer configMu.RUnlock()
    
    	return opts.ReplicationWorkersWait
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Dec 06 09:09:22 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  9. cmd/admin-handlers.go

    		if err != nil {
    			errResp(err)
    			return
    		}
    	}
    
    	nsLock := objectAPI.NewNSLock(minioMetaBucket, "health-check-in-progress")
    	lkctx, err := nsLock.GetLock(ctx, newDynamicTimeout(deadline, deadline))
    	if err != nil { // returns a locked lock
    		errResp(err)
    		return
    	}
    
    	defer nsLock.Unlock(lkctx)
    	healthCtx, healthCancel := context.WithTimeout(lkctx.Context(), deadline)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 29 17:39:04 GMT 2024
    - 97.8K bytes
    - Viewed (2)
  10. cmd/data-scanner-metric.go

    	if c != nil {
    		c2 := c.clone()
    		c = &c2
    	}
    	p.cycleInfoMu.Lock()
    	p.cycleInfo = c
    	p.cycleInfoMu.Unlock()
    }
    
    // getCycle returns the current cycle metrics.
    // If not nil, the returned value can safely be modified.
    func (p *scannerMetrics) getCycle() *currentScannerCycle {
    	p.cycleInfoMu.Lock()
    	defer p.cycleInfoMu.Unlock()
    	if p.cycleInfo == nil {
    		return nil
    	}
    	c := p.cycleInfo.clone()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 25 05:15:31 GMT 2023
    - 9.1K bytes
    - Viewed (0)
Back to top