Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 857 for crBlock (0.11 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go

    	// This handler is run at the end of every Add/Update/Delete method
    	// and additionally gets the previous value of the object.
    	eventHandler func(*watchCacheEvent)
    
    	// for testing timeouts.
    	clock clock.Clock
    
    	// An underlying storage.Versioner.
    	versioner storage.Versioner
    
    	// cacher's group resource
    	groupResource schema.GroupResource
    
    	// For testing cache interval invalidation.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 10:20:57 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  2. src/runtime/mgclimit.go

    		l.bucket.fill -= uint64(-change)
    	}
    	if change != 0 && enabled {
    		l.enabled.Store(false)
    	}
    }
    
    // tryLock attempts to lock l. Returns true on success.
    func (l *gcCPULimiterState) tryLock() bool {
    	return l.lock.CompareAndSwap(0, 1)
    }
    
    // unlock releases the lock on l. Must be called if tryLock returns true.
    func (l *gcCPULimiterState) unlock() {
    	old := l.lock.Swap(0)
    	if old != 1 {
    		throw("double unlock")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 22:07:41 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  3. pkg/kubelet/pleg/evented.go

    	// The channel from which the subscriber listens events.
    	eventChannel chan *PodLifecycleEvent
    	// Cache for storing the runtime states required for syncing pods.
    	cache kubecontainer.Cache
    	// For testability.
    	clock clock.Clock
    	// GenericPLEG is used to force relist when required.
    	genericPleg podLifecycleEventGeneratorHandler
    	// The maximum number of retries when getting container events from the runtime.
    	eventedPlegMaxStreamRetries int
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 10:46:06 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  4. subprojects/core/src/testFixtures/groovy/org/gradle/internal/classpath/ClassBasedLock.groovy

            initializeLock()
            lock.lockInterruptibly()
        }
    
        @Override
        boolean tryLock() {
            initializeLock()
            return lock.tryLock()
        }
    
        @Override
        boolean tryLock(long time, @NotNull TimeUnit unit) throws InterruptedException {
            initializeLock()
            return tryLock(time, unit)
        }
    
        @Override
        Condition newCondition() {
            initializeLock()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Jul 24 15:57:56 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  5. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/resources/ExclusiveAccessResourceLockTest.groovy

            when:
            resourceLock.tryLock()
    
            then:
            thrown(IllegalStateException)
    
            when:
            resourceLock.unlock()
    
            then:
            thrown(IllegalStateException)
        }
    
        def "can lock and unlock a resource"() {
            when:
            coordinationService.withStateLock(tryLock(resourceLock))
    
            then:
            resourceLock.doIsLocked()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  6. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/resources/DefaultResourceLockCoordinationServiceTest.groovy

                @Override
                ResourceLockState.Disposition transform(ResourceLockState workerLeaseState) {
                    if (lock1.tryLock() && lock2.tryLock()) {
                        return FINISHED
                    } else {
                        return FAILED
                    }
                }
            })
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 17:16:10 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  7. test/fixedbugs/bug273.go

    }
    
    func bigcap() {
    	g1 = make([]block, 10, big)
    }
    
    type cblock [1<<16 - 1]byte
    
    var g4 chan cblock
    
    func badchancap() {
    	g4 = make(chan cblock, minus1)
    }
    
    func bigchancap() {
    	g4 = make(chan cblock, big)
    }
    
    func overflowchan() {
    	const ptrSize = unsafe.Sizeof(uintptr(0))
    	g4 = make(chan cblock, 1<<(30*(ptrSize/4)))
    }
    
    func main() {
    	shouldfail(badlen, "badlen")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 26 14:06:28 UTC 2018
    - 1.3K bytes
    - Viewed (0)
  8. pkg/kubelet/cm/dra/claiminfo_test.go

    		description string
    		funcGen     func(cache *claimInfoCache) func() error
    		wantErr     bool
    	}{
    		{
    			description: "RLock-ed cache allows another RLock",
    			funcGen: func(cache *claimInfoCache) func() error {
    				return func() error {
    					if !cache.RWMutex.TryRLock() {
    						return errors.New("RLock failed")
    					}
    					return nil
    				}
    			},
    		},
    		{
    			description: "cache is locked inside a function",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 03 13:30:31 UTC 2024
    - 21K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go

    	startBucketID     int64
    	clock             clock.Clock
    	bookmarkFrequency time.Duration
    }
    
    func newTimeBucketWatchers(clock clock.Clock, bookmarkFrequency time.Duration) *watcherBookmarkTimeBuckets {
    	return &watcherBookmarkTimeBuckets{
    		watchersBuckets:   make(map[int64][]*cacheWatcher),
    		createTime:        clock.Now(),
    		startBucketID:     0,
    		clock:             clock,
    		bookmarkFrequency: bookmarkFrequency,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 51.8K bytes
    - Viewed (0)
  10. guava/src/com/google/common/util/concurrent/ForwardingLock.java

        delegate().lockInterruptibly();
      }
    
      @Override
      public boolean tryLock() {
        return delegate().tryLock();
      }
    
      @Override
      public boolean tryLock(long time, TimeUnit unit) throws InterruptedException {
        return delegate().tryLock(time, unit);
      }
    
      @Override
      public void unlock() {
        delegate().unlock();
      }
    
      @Override
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Apr 04 09:45:04 UTC 2023
    - 1.5K bytes
    - Viewed (0)
Back to top