Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 487 for acquirem (0.15 sec)

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

        def "close when lock has never been acquired"() {
            when:
            cacheAccess.close()
    
            then:
            0 * _
        }
    
        def "acquires lock then runs action and retains lock on completion"() {
            def action = Mock(Supplier)
            def lock = Mock(FileLock)
    
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:51 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  2. guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

     *
     * <p>Deadlocks can arise when locks are acquired in an order that forms a cycle. In a simple
     * example involving two locks and two threads, deadlock occurs when one thread acquires Lock A, and
     * then Lock B, while another thread acquires Lock B, and then Lock A:
     *
     * <pre>
     * Thread1: acquire(LockA) --X acquire(LockB)
     * Thread2: acquire(LockB) --X acquire(LockA)
     * </pre>
     *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Dec 15 19:31:54 UTC 2023
    - 35.9K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

     *
     * <p>Deadlocks can arise when locks are acquired in an order that forms a cycle. In a simple
     * example involving two locks and two threads, deadlock occurs when one thread acquires Lock A, and
     * then Lock B, while another thread acquires Lock B, and then Lock A:
     *
     * <pre>
     * Thread1: acquire(LockA) --X acquire(LockB)
     * Thread2: acquire(LockB) --X acquire(LockA)
     * </pre>
     *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Dec 15 19:31:54 UTC 2023
    - 35.9K bytes
    - Viewed (0)
  4. test/typeparam/chansimp.dir/a.go

    		c: make(chan Val, 1),
    	}
    	r.c <- initial
    	return r
    }
    
    // Acquire acquires the exclusive value for private use.
    // It must be released using the Release method.
    func (e *Exclusive[Val]) Acquire() Val {
    	return <-e.c
    }
    
    // TryAcquire attempts to acquire the value. The ok result reports whether
    // the value was acquired. If the value is acquired, it must be released
    // using the Release method.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 28 21:40:40 UTC 2021
    - 5.5K bytes
    - Viewed (0)
  5. src/syscall/forkpipe2.go

    	// on ForkLock.
    	forking int
    )
    
    // hasWaitingReaders reports whether any goroutine is waiting
    // to acquire a read lock on rw. It is defined in the sync package.
    func hasWaitingReaders(rw *sync.RWMutex) bool
    
    // acquireForkLock acquires a write lock on ForkLock.
    // ForkLock is exported and we've promised that during a fork
    // we will call ForkLock.Lock, so that no other threads create
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 10 19:19:59 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  6. cmd/namespace-lock_test.go

    		// 3) lk3 or lk4 (whichever didn't execute in step 1) then executes and creates
    		//    a new entry in lockMap and acquires a lock for the same resource.
    
    		<-lk2ch
    		lk3ok := <-lk3ch
    		lk4ok := <-lk4ch
    
    		if lk3ok && lk4ok {
    			t.Fatalf("multiple locks acquired; iteration=%d, lk3=%t, lk4=%t", i, lk3ok, lk4ok)
    		}
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Apr 23 18:58:53 UTC 2021
    - 3.1K bytes
    - Viewed (0)
  7. subprojects/core/src/main/java/org/gradle/api/internal/project/ProjectState.java

         */
        ResourceLock getAccessLock();
    
        /**
         * Returns the lock that should be acquired by non-isolated tasks from this project prior to execution.
         *
         * <p>This lock allows both access to the project state and the right to execute as a task. Acquiring this lock also acquires the lock returned by {@link #getAccessLock()}.
         *
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Dec 20 08:25:03 UTC 2022
    - 5.3K bytes
    - Viewed (0)
  8. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/FileLockManager.java

    @ServiceScope(Scope.Global.class)
    public interface FileLockManager {
        /**
         * Creates a lock for the given file with the given mode. Acquires a lock with the given mode, which is held until the lock is
         * released by calling {@link FileLock#close()}. This method blocks until the lock can be acquired.
         *
         * @param target The file to be locked.
         * @param options The lock options.
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:51 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  9. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/work/DefaultWorkerLeaseServiceWorkerLeaseTest.groovy

                    }
                }
            }
    
            then:
            instant.acquired > instant.worker2Finished
    
            cleanup:
            registry?.stop()
        }
    
        def "does not release worker lease when locks can be acquired without blocking"() {
            def registry = workerLeaseService(1)
            def resource = resourceLock("one")
    
            when:
            async {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 13.2K bytes
    - Viewed (0)
  10. pkg/util/flock/flock_unix.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package flock
    
    import "golang.org/x/sys/unix"
    
    // Acquire acquires a lock on a file for the duration of the process. This method
    // is reentrant.
    func Acquire(path string) error {
    	fd, err := unix.Open(path, unix.O_CREAT|unix.O_RDWR|unix.O_CLOEXEC, 0600)
    	if err != nil {
    		return err
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 1.1K bytes
    - Viewed (0)
Back to top