Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 128 for acquirem (0.27 sec)

  1. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/OnDemandFileAccessTest.groovy

        OnDemandFileAccess lock
        File file
    
        def setup() {
            file = dir.file("some-target-file")
            lock = new OnDemandFileAccess(file, "some-lock", manager)
        }
    
        def "acquires shared lock to read file"() {
            def action = {} as Supplier
    
            when:
            lock.readFile(action)
    
            then:
            !file.exists()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:50 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  2. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/resources/SharedResourceLeaseRegistryTest.groovy

                        coordinationService.withStateLock(lock(sharedResourceLock))
                        assert lockIsHeld(sharedResourceLock)
                        acquired.countDown()
                        acquired.await()
                        coordinationService.withStateLock(unlock(sharedResourceLock))
                    }
                }
            }
    
            then:
            noExceptionThrown()
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 5K bytes
    - Viewed (0)
  3. src/iter/iter.go

    	var (
    		v          V
    		ok         bool
    		done       bool
    		yieldNext  bool
    		racer      int
    		panicValue any
    		seqDone    bool // to detect Goexit
    	)
    	c := newcoro(func(c *coro) {
    		race.Acquire(unsafe.Pointer(&racer))
    		if done {
    			race.Release(unsafe.Pointer(&racer))
    			return
    		}
    		yield := func(v1 V) bool {
    			if done {
    				return false
    			}
    			if !yieldNext {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:28 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  4. src/sync/mutex.go

    	// of the wait queue. If a waiter fails to acquire the mutex for more than 1ms,
    	// it switches mutex to the starvation mode.
    	//
    	// In starvation mode ownership of the mutex is directly handed off from
    	// the unlocking goroutine to the waiter at the front of the queue.
    	// New arriving goroutines don't try to acquire the mutex even if it appears
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  5. subprojects/core/src/test/groovy/org/gradle/execution/plan/AbstractExecutionPlanSpec.groovy

            return locks.findAll { it.locked }.collect { it.project } as Set
        }
    
        protected void recordLocks(Closure cl) {
            acquired.clear()
            cl()
            acquired.clear()
        }
    
        protected ProjectInternal project(ProjectInternal parent = null, String name = "root") {
            def projectState = Mock(ProjectState)
    
            def project = Mock(ProjectInternal, name: name)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Mar 24 11:56:02 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  6. pkg/test/echo/server/forwarder/executor.go

    func (g *execGroup) Go(ctx context.Context, work func() error) {
    	g.g.Go(func() error {
    		g.e.totalRequests.Inc()
    		g.e.activeRequests.Inc()
    		defer g.e.activeRequests.Dec()
    
    		// Acquire the group concurrency semaphore.
    		if err := g.sem.Acquire(ctx, 1); err != nil {
    			return fmt.Errorf("request set timed out: %v", err)
    		}
    		defer g.sem.Release(1)
    
    		return work()
    	})
    }
    
    func (g *execGroup) Wait() *multierror.Error {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 10 18:09:08 UTC 2022
    - 2K bytes
    - Viewed (0)
  7. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/FixedExclusiveModeCrossProcessCacheAccessTest.groovy

        def cacheAccess = new FixedExclusiveModeCrossProcessCacheAccess("<cache>", file, DefaultLockOptions.mode(FileLockManager.LockMode.Exclusive), lockManager, initAction, onOpenAction, onCloseAction)
    
        def "acquires lock then validates cache and runs handler action on open"() {
            def lock = Mock(FileLock)
    
            when:
            cacheAccess.open()
    
            then:
            1 * lockManager.lock(file, _, _, "", _) >> lock
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:51 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  8. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/work/WorkerLeaseService.java

        /**
         * Runs the given {@link Factory} while the specified locks are released and the given new lock is acquired. On completion,
         * the new lock is released and the old locks reacquired.
         * If a lock cannot be immediately (re)acquired, the current worker lease will be released and the method will block until the locks are (re)acquired.
         */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 06:02:18 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  9. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/filelock/LockInfoAccess.java

                    return FileLockOutcome.LOCKED_BY_ANOTHER_PROCESS;
                } else {
                    return FileLockOutcome.acquired(fileLock);
                }
            } catch (OverlappingFileLockException e) {
                // Locked by this process, treat as not acquired
                return FileLockOutcome.LOCKED_BY_THIS_PROCESS;
            }
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:51 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  10. src/runtime/proflabel.go

    	// This would more properly use &getg().labels as the sync address,
    	// but we do the read in a signal handler and can't call the race runtime then.
    	//
    	// This uses racereleasemerge rather than just racerelease so
    	// the acquire in profBuf.read synchronizes with *all* prior
    	// setProfLabel operations, not just the most recent one. This
    	// is important because profBuf.read will observe different
    	// labels set by different setProfLabel operations on
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 2.1K bytes
    - Viewed (0)
Back to top