Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 128 for Unlock (0.17 sec)

  1. internal/dsync/drwmutex.go

    }
    
    // Unlock unlocks the write lock.
    //
    // It is a run-time error if dm is not locked on entry to Unlock.
    func (dm *DRWMutex) Unlock(ctx context.Context) {
    	dm.m.Lock()
    	dm.cancelRefresh()
    	dm.m.Unlock()
    
    	restClnts, owner := dm.clnt.GetLockers()
    	// create temp array on stack
    	locks := make([]string, len(restClnts))
    
    	{
    		dm.m.Lock()
    		defer dm.m.Unlock()
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  2. cmd/lock-rest-client.go

    	}
    	return ok, err
    }
    
    // RLock calls read lock REST API.
    func (c *lockRESTClient) RLock(ctx context.Context, args dsync.LockArgs) (reply bool, err error) {
    	return c.call(ctx, lockRPCRLock, &args)
    }
    
    // Lock calls lock REST API.
    func (c *lockRESTClient) Lock(ctx context.Context, args dsync.LockArgs) (reply bool, err error) {
    	return c.call(ctx, lockRPCLock, &args)
    }
    
    // RUnlock calls read unlock REST API.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Nov 24 17:07:14 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  3. prepare_stmt.go

    	}
    
    	return nil, ErrInvalidDB
    }
    
    func (db *PreparedStmtDB) Close() {
    	db.Mux.Lock()
    	defer db.Mux.Unlock()
    
    	for _, query := range db.PreparedSQL {
    		if stmt, ok := db.Stmts[query]; ok {
    			delete(db.Stmts, query)
    			go stmt.Close()
    		}
    	}
    }
    
    func (sdb *PreparedStmtDB) Reset() {
    	sdb.Mux.Lock()
    	defer sdb.Mux.Unlock()
    
    	for _, stmt := range sdb.Stmts {
    		go stmt.Close()
    	}
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Thu Mar 28 08:47:39 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  4. cmd/local-locker.go

    }
    
    func (l *localLocker) RUnlock(_ context.Context, args dsync.LockArgs) (reply bool, err error) {
    	if len(args.Resources) > 1 {
    		return false, fmt.Errorf("internal error: localLocker.RUnlock called with more than one resource")
    	}
    
    	l.mutex.Lock()
    	defer l.mutex.Unlock()
    	var lri []lockRequesterInfo
    
    	resource := args.Resources[0]
    	if lri, reply = l.lockMap[resource]; !reply {
    		// No lock is held on the given name
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  5. internal/event/targetlist.go

    	list.statLock.Lock()
    	defer list.statLock.Unlock()
    
    	stats, ok := list.targetStats[id]
    	if !ok {
    		// should not happen
    		return
    	}
    
    	stats.currentSendCalls--
    	list.targetStats[id] = stats
    	return
    }
    
    func (list *TargetList) incFailedEvents(id TargetID) {
    	list.statLock.Lock()
    	defer list.statLock.Unlock()
    
    	stats, ok := list.targetStats[id]
    	if !ok {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  6. cmd/lock-rest-client_test.go

    	// Attempt all calls.
    	_, err = lkClient.RLock(context.Background(), dsync.LockArgs{})
    	if err == nil {
    		t.Fatal("Expected for Rlock to fail")
    	}
    
    	_, err = lkClient.Lock(context.Background(), dsync.LockArgs{})
    	if err == nil {
    		t.Fatal("Expected for Lock to fail")
    	}
    
    	_, err = lkClient.RUnlock(context.Background(), dsync.LockArgs{})
    	if err == nil {
    		t.Fatal("Expected for RUnlock to fail")
    	}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 2K bytes
    - Viewed (0)
  7. internal/grid/muxclient.go

    	if responses == nil {
    		return nil, errors.New("RequestStream: responses channel is nil")
    	}
    	m.init = true
    	m.respMu.Lock()
    	if m.closed {
    		m.respMu.Unlock()
    		return nil, ErrDisconnected
    	}
    	m.respWait = responses // Route directly to output.
    	m.respMu.Unlock()
    
    	// Try to grab an initial block.
    	m.singleResp = false
    	m.RecvSeq = m.SendSeq // Sync
    	if cap(requests) > 0 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  8. cmd/tier.go

    }
    
    func (t *tierMetrics) logSuccess(tier string) {
    	t.Lock()
    	defer t.Unlock()
    
    	stat := t.requestsCount[tier]
    	stat.success++
    	t.requestsCount[tier] = stat
    }
    
    func (t *tierMetrics) logFailure(tier string) {
    	t.Lock()
    	defer t.Unlock()
    
    	stat := t.requestsCount[tier]
    	stat.failure++
    	t.requestsCount[tier] = stat
    }
    
    var (
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  9. cmd/http-stats.go

    	if stats == nil {
    		return
    	}
    	stats.Lock()
    	defer stats.Unlock()
    	if stats.apiStats == nil {
    		stats.apiStats = make(map[string]int)
    	}
    	stats.apiStats[api]++
    }
    
    // Dec increments the api stats counter.
    func (stats *HTTPAPIStats) Dec(api string) {
    	if stats == nil {
    		return
    	}
    	stats.Lock()
    	defer stats.Unlock()
    	if val, ok := stats.apiStats[api]; ok && val > 0 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Mar 10 09:15:15 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  10. cmd/iam-store.go

    type IAMStorageAPI interface {
    	// The role of the read-write lock is to prevent go routines from
    	// concurrently reading and writing the IAM storage. The (r)lock()
    	// functions return the iamCache. The cache can be safely written to
    	// only when returned by `lock()`.
    	lock() *iamCache
    	unlock()
    	rlock() *iamCache
    	runlock()
    	getUsersSysType() UsersSysType
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 74.4K bytes
    - Viewed (2)
Back to top