Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 167 for Unlock (0.19 sec)

  1. cmd/dynamic-timeouts.go

    	if index < dynamicTimeoutLogSize {
    		dt.mutex.Lock()
    		dt.log[index] = duration
    
    		// We leak entries while we copy
    		if entries == dynamicTimeoutLogSize {
    
    			// Make copy on stack in order to call adjust()
    			logCopy := [dynamicTimeoutLogSize]time.Duration{}
    			copy(logCopy[:], dt.log[:])
    
    			// reset log entries
    			atomic.StoreInt64(&dt.entries, 0)
    			dt.mutex.Unlock()
    
    			dt.adjust(logCopy)
    			return
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Aug 19 23:21:05 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  2. 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  3. internal/config/callhome/callhome.go

    // Enabled - indicates if callhome is enabled or not
    func (c *Config) Enabled() bool {
    	configLock.RLock()
    	defer configLock.RUnlock()
    
    	return c.Enable
    }
    
    // FrequencyDur - returns the currently configured callhome frequency
    func (c *Config) FrequencyDur() time.Duration {
    	configLock.RLock()
    	defer configLock.RUnlock()
    
    	if c.Frequency == 0 {
    		return callhomeCycleDefault
    	}
    
    	return c.Frequency
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  4. cmd/site-replication-metrics.go

    	Endpoint string `json:"-"`
    	// Secure is true if the replication target endpoint is secure
    	Secure bool `json:"-"`
    }
    
    func (sr *SRStats) update(st replStat, dID string) {
    	sr.lock.Lock()
    	defer sr.lock.Unlock()
    	srs, ok := sr.M[dID]
    	if !ok {
    		srs = &SRStatus{
    			XferRateLrg: newXferStats(),
    			XferRateSml: newXferStats(),
    		}
    	}
    	srs.Endpoint = st.Endpoint
    	srs.Secure = st.Secure
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Feb 06 06:00:45 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  5. 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  6. cmd/event-notification.go

    func (evnot *EventNotifier) RemoveNotification(bucketName string) {
    	evnot.Lock()
    	defer evnot.Unlock()
    
    	delete(evnot.bucketRulesMap, bucketName)
    }
    
    // RemoveAllBucketTargets - closes and removes all notification targets.
    func (evnot *EventNotifier) RemoveAllBucketTargets() {
    	evnot.Lock()
    	defer evnot.Unlock()
    
    	targetIDSet := event.NewTargetIDSet()
    	for k := range evnot.targetList.TargetMap() {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  7. cmd/lock-rest-server.go

    	resp := lockRPCUnlock.NewResponse()
    	_, err := l.ll.Unlock(context.Background(), *args)
    	// Ignore the Unlock() "reply" return value because if err == nil, "reply" is always true
    	// Consequently, if err != nil, reply is always false
    	return l.makeResp(resp, err)
    }
    
    // RLockHandler - Acquires an RLock.
    func (l *lockRESTServer) RLockHandler(args *dsync.LockArgs) (*dsync.LockResp, *grid.RemoteErr) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  8. 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Mar 07 16:12:41 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  9. internal/s3select/progress.go

    	// This ensures that Close will block until Read has completed.
    	// This allows another goroutine to close the reader.
    	pr.closedMu.Lock()
    	defer pr.closedMu.Unlock()
    	if pr.closed {
    		return 0, errors.New("progressReader: read after Close")
    	}
    	return pr.processedReader.Read(p)
    }
    
    func (pr *progressReader) Close() error {
    	pr.closedMu.Lock()
    	defer pr.closedMu.Unlock()
    	if pr.closed {
    		return nil
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Oct 18 15:44:36 GMT 2021
    - 4.2K bytes
    - Viewed (0)
  10. internal/config/identity/plugin/config.go

    func (h *metrics) setConnSuccess(reqStartTime time.Time) {
    	h.Lock()
    	defer h.Unlock()
    	h.LastCheckSuccess = reqStartTime
    }
    
    func (h *metrics) setConnFailure(reqStartTime time.Time) {
    	h.Lock()
    	defer h.Unlock()
    	h.LastCheckFailure = reqStartTime
    }
    
    func (h *metrics) updateLastFullMinute(currReqMinute time.Time) {
    	// Assumes the caller has h.Lock()'ed
    	h.lastFullMinute = h.currentMinute
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 13.3K bytes
    - Viewed (3)
Back to top