Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 154 for Unlock (0.2 sec)

  1. cmd/erasure-server-pool.go

    	defer func() {
    		if unlockOnDefer {
    			nsUnlocker()
    		}
    	}()
    
    	// Acquire lock
    	if !opts.NoLock {
    		lock := z.NewNSLock(bucket, object)
    		lkctx, err := lock.GetRLock(ctx, globalOperationTimeout)
    		if err != nil {
    			return nil, err
    		}
    		ctx = lkctx.Context()
    		nsUnlocker = func() { lock.RUnlock(lkctx) }
    		unlockOnDefer = true
    	}
    
    	checkPrecondFn := opts.CheckPrecondFn
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 80.5K bytes
    - Viewed (0)
  2. cmd/tier-journal.go

    	// Open journal if it hasn't been
    	err := jd.Open()
    	if err != nil {
    		return err
    	}
    
    	b, err := je.MarshalMsg(nil)
    	if err != nil {
    		return err
    	}
    
    	jd.Lock()
    	defer jd.Unlock()
    	_, err = jd.file.Write(b)
    	if err != nil {
    		// Do not leak fd here, close the file properly.
    		Fdatasync(jd.file)
    		_ = jd.file.Close()
    
    Go
    - Registered: Sun Feb 25 19:28:16 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  3. internal/config/identity/openid/provider/keycloak.go

    	if err != nil {
    		return err
    	}
    	defer resp.Body.Close()
    
    	var accessToken Token
    	if err = json.NewDecoder(resp.Body).Decode(&accessToken); err != nil {
    		return err
    	}
    
    	k.Lock()
    	k.accessToken = accessToken
    	k.Unlock()
    	return nil
    }
    
    // LookupUser lookup user by their userid.
    func (k *KeycloakProvider) LookupUser(userid string) (User, error) {
    	req, err := http.NewRequest(http.MethodGet, k.adminURL, nil)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 29 01:27:09 GMT 2022
    - 4.6K bytes
    - Viewed (0)
  4. internal/lsync/lrwmutex.go

    	}
    }
    
    // RUnlock releases a read lock held on lm.
    //
    // It is a run-time error if lm is not locked on entry to RUnlock.
    func (lm *LRWMutex) RUnlock() {
    	isWriteLock := false
    	success := lm.unlock(isWriteLock)
    	if !success {
    		panic("Trying to RUnlock() while no RLock() is active")
    	}
    }
    
    func (lm *LRWMutex) unlock(isWriteLock bool) (unlocked bool) {
    	lm.mu.Lock()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  5. cmd/globals.go

    	globalAuthPluginMutex.Lock()
    	defer globalAuthPluginMutex.Unlock()
    	return globalAuthNPlugin
    }
    
    func newGlobalAuthZPluginFn() *polplugin.AuthZPlugin {
    	globalAuthPluginMutex.Lock()
    	defer globalAuthPluginMutex.Unlock()
    	return globalAuthZPlugin
    }
    
    func setGlobalAuthNPlugin(authn *idplugin.AuthNPlugin) {
    	globalAuthPluginMutex.Lock()
    	globalAuthNPlugin = authn
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  6. internal/dsync/dsync-server_test.go

    	return reply, nil
    }
    
    func (l *lockServer) Unlock(args *LockArgs) (reply bool, err error) {
    	if d := atomic.LoadInt64(&l.responseDelay); d != 0 {
    		time.Sleep(time.Duration(d))
    	}
    
    	l.mutex.Lock()
    	defer l.mutex.Unlock()
    	var locksHeld int64
    	if locksHeld, reply = l.lockMap[args.Resources[0]]; !reply { // No lock is held on the given name
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jan 23 16:46:37 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  7. cmd/bootstrap-peer-server.go

    				if clnt.gridConn.State() != grid.StateConnected {
    					mu.Lock()
    					offlineEndpoints = append(offlineEndpoints, fmt.Errorf("%s is unreachable: %w", clnt, grid.ErrDisconnected))
    					mu.Unlock()
    					return
    				}
    
    				ctx, cancel := context.WithTimeout(ctx, 2*time.Second)
    				defer cancel()
    
    				err := clnt.Verify(ctx, srcCfg)
    				mu.Lock()
    				if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  8. cmd/signals.go

    	// Custom exit function
    	exit := func(success bool) {
    		if globalLoggerOutput != nil {
    			globalLoggerOutput.Close()
    		}
    
    		// If global profiler is set stop before we exit.
    		globalProfilerMu.Lock()
    		defer globalProfilerMu.Unlock()
    		for _, p := range globalProfiler {
    			p.Stop()
    		}
    
    		if success {
    			os.Exit(0)
    		}
    
    		os.Exit(1)
    	}
    
    	stopProcess := func() bool {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 17:57:52 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  9. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  10. internal/store/batch.go

    func (b *Batch[K, T]) GetByKey(key K) (T, bool) {
    	b.Lock()
    	defer b.Unlock()
    
    	item, ok := b.items[key]
    	return item, ok
    }
    
    // Len returns the no of items in the batch
    func (b *Batch[K, T]) Len() int {
    	b.Lock()
    	defer b.Unlock()
    
    	return len(b.keys)
    }
    
    // IsFull checks if the batch is full or not
    func (b *Batch[K, T]) IsFull() bool {
    	b.Lock()
    	defer b.Unlock()
    
    	return b.isFull()
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 2.5K bytes
    - Viewed (0)
Back to top