Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 288 for Unlock (0.47 sec)

  1. 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)
  2. internal/cachevalue/cache.go

    		if t.updating.TryLock() {
    			go func() {
    				defer t.updating.Unlock()
    				t.update()
    			}()
    		}
    		return v.v, v.e
    	}
    
    	// Get lock. Either we get it or we wait for it.
    	t.updating.Lock()
    	if time.Since(time.UnixMilli(t.lastUpdateMs.Load())) < ttl {
    		// There is a new value, release lock and return it.
    		v = t.valErr.Load()
    		t.updating.Unlock()
    		return v.v, v.e
    	}
    	t.update()
    	v = t.valErr.Load()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Mar 01 16:00:42 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  3. 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  4. internal/dsync/dsync-client_test.go

    	}
    }
    
    func (restClient *ReconnectRESTClient) RLock(ctx context.Context, args LockArgs) (status bool, err error) {
    	return restClient.Call("/v1/rlock", args)
    }
    
    func (restClient *ReconnectRESTClient) Lock(ctx context.Context, args LockArgs) (status bool, err error) {
    	return restClient.Call("/v1/lock", args)
    }
    
    func (restClient *ReconnectRESTClient) RUnlock(ctx context.Context, args LockArgs) (status bool, err error) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 20 17:36:09 GMT 2022
    - 4.4K bytes
    - Viewed (0)
  5. 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  6. internal/bucket/bandwidth/measurement.go

    func (m *bucketMeasurement) updateExponentialMovingAverage(endTime time.Time) {
    	// Calculate aggregate avg bandwidth and exp window avg
    	m.lock.Lock()
    	defer func() {
    		m.startTime = endTime
    		m.lock.Unlock()
    	}()
    
    	if m.startTime.IsZero() {
    		return
    	}
    
    	if endTime.Before(m.startTime) {
    		return
    	}
    
    	duration := endTime.Sub(m.startTime)
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Jun 03 20:41:51 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  7. cmd/metacache-walk.go

    			return ctx.Err()
    		}
    		if opts.Limit > 0 && objsReturned >= opts.Limit {
    			return nil
    		}
    
    		if s.walkMu != nil {
    			s.walkMu.Lock()
    		}
    		entries, err := s.ListDir(ctx, "", opts.Bucket, current, -1)
    		if s.walkMu != nil {
    			s.walkMu.Unlock()
    		}
    		if err != nil {
    			// Folder could have gone away in-between
    			if err != errVolumeNotFound && err != errFileNotFound {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  8. guava-tests/benchmark/com/google/common/util/concurrent/CycleDetectingLockFactoryBenchmark.java

      }
    
      @Benchmark
      void unorderedCycleDetectingLocks(int reps) {
        lockAndUnlock(factory.newReentrantLock("foo"), reps);
      }
    
      private static void lockAndUnlock(Lock lock, int reps) {
        for (int i = 0; i < reps; i++) {
          lock.lock();
          lock.unlock();
        }
      }
    
      @Benchmark
      void orderedPlainLocks(int reps) {
        lockAndUnlockNested(plainLocks, reps);
      }
    
      @Benchmark
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.4K bytes
    - Viewed (0)
  9. cmd/handler-api.go

    }
    
    func (t *apiConfig) odirectEnabled() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.enableODirect
    }
    
    func (t *apiConfig) shouldGzipObjects() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.gzipObjects
    }
    
    func (t *apiConfig) permitRootAccess() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.rootAccess
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 08 09:22:27 GMT 2024
    - 10K bytes
    - Viewed (0)
  10. cmd/metacache-set.go

    					cancel()
    					exit = true
    				}
    			}
    			metaMu.Unlock()
    		}
    	}()
    
    	const retryDelay = 200 * time.Millisecond
    	const maxTries = 5
    
    	// Keep destination...
    	// Write results to disk.
    	bw := newMetacacheBlockWriter(entries, func(b *metacacheBlock) error {
    		// if the block is 0 bytes and its a first block skip it.
    		// skip only this for Transient caches.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 18 04:42:11 GMT 2024
    - 30.4K bytes
    - Viewed (0)
Back to top