Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 43 for writer_lock (0.21 sec)

  1. src/cmd/go/internal/lockedfile/internal/filelock/filelock_other.go

    // license that can be found in the LICENSE file.
    
    //go:build !unix && !windows
    
    package filelock
    
    import (
    	"errors"
    	"io/fs"
    )
    
    type lockType int8
    
    const (
    	readLock = iota + 1
    	writeLock
    )
    
    func lock(f File, lt lockType) error {
    	return &fs.PathError{
    		Op:   lt.String(),
    		Path: f.Name(),
    		Err:  errors.ErrUnsupported,
    	}
    }
    
    func unlock(f File) error {
    	return &fs.PathError{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 17 02:24:35 UTC 2023
    - 563 bytes
    - Viewed (0)
  2. src/cmd/go/internal/lockedfile/internal/filelock/filelock_unix.go

    //go:build darwin || dragonfly || freebsd || illumos || linux || netbsd || openbsd
    
    package filelock
    
    import (
    	"io/fs"
    	"syscall"
    )
    
    type lockType int16
    
    const (
    	readLock  lockType = syscall.LOCK_SH
    	writeLock lockType = syscall.LOCK_EX
    )
    
    func lock(f File, lt lockType) (err error) {
    	for {
    		err = syscall.Flock(int(f.Fd()), int(lt))
    		if err != syscall.EINTR {
    			break
    		}
    	}
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 17 02:24:35 UTC 2023
    - 723 bytes
    - Viewed (0)
  3. platforms/core-execution/build-cache-local/src/main/java/org/gradle/caching/local/internal/DirectoryBuildCache.java

            persistentCache.withFileLock(() -> {
                // Additional locking necessary because of https://github.com/gradle/gradle/issues/3537
                lock.writeLock().lock();
                try {
                    storeInsideLock(key, file);
                } finally {
                    lock.writeLock().unlock();
                }
            });
        }
    
        private void storeInsideLock(HashCode key, File sourceFile) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:53 UTC 2024
    - 7K bytes
    - Viewed (0)
  4. src/image/jpeg/writer.go

    						yCbCrToYCbCr(ycbcr, p, &b, &cb[i], &cr[i])
    					} else {
    						toYCbCr(m, p, &b, &cb[i], &cr[i])
    					}
    					prevDCY = e.writeBlock(&b, 0, prevDCY)
    				}
    				scale(&b, &cb)
    				prevDCCb = e.writeBlock(&b, 1, prevDCCb)
    				scale(&b, &cr)
    				prevDCCr = e.writeBlock(&b, 1, prevDCCr)
    			}
    		}
    	}
    	// Pad the last byte with 1's.
    	e.emit(0x7f, 7)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 17.1K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java

        Lock readLock = striped.get(key).readLock();
        WeakReference<Object> garbage = new WeakReference<>(new Object());
        GcFinalization.awaitClear(garbage);
        Lock writeLock = striped.get(key).writeLock();
        readLock.lock();
        assertFalse(writeLock.tryLock());
        readLock.unlock();
      }
    
      @AndroidIncompatible // Presumably GC doesn't trigger, despite our efforts.
      public void testStrongImplementations() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 09 22:57:07 UTC 2022
    - 8.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/StripedTest.java

        Lock readLock = striped.get(key).readLock();
        WeakReference<Object> garbage = new WeakReference<>(new Object());
        GcFinalization.awaitClear(garbage);
        Lock writeLock = striped.get(key).writeLock();
        readLock.lock();
        assertFalse(writeLock.tryLock());
        readLock.unlock();
      }
    
      @AndroidIncompatible // Presumably GC doesn't trigger, despite our efforts.
      public void testStrongImplementations() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 09 22:57:07 UTC 2022
    - 8.4K bytes
    - Viewed (0)
  7. analysis/analysis-api-standalone/analysis-api-standalone-base/src/org/jetbrains/kotlin/analysis/api/standalone/base/project/structure/ApplicationServiceRegistration.kt

        ) {
            for (registrar in registrars) {
                if (lock.readLock().withLock { application.isRegistrarRegistered(registrar) }) {
                    continue
                }
    
                lock.writeLock().withLock {
                    if (application.isRegistrarRegistered(registrar)) return@withLock
                    registrar.register()
                    application.serviceRegistered[registrar::class] = true
                }
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Thu May 16 11:53:35 UTC 2024
    - 3K bytes
    - Viewed (0)
  8. src/cmd/go/internal/lockedfile/internal/filelock/filelock_windows.go

    //go:build windows
    
    package filelock
    
    import (
    	"internal/syscall/windows"
    	"io/fs"
    	"syscall"
    )
    
    type lockType uint32
    
    const (
    	readLock  lockType = 0
    	writeLock lockType = windows.LOCKFILE_EXCLUSIVE_LOCK
    )
    
    const (
    	reserved = 0
    	allBytes = ^uint32(0)
    )
    
    func lock(f File, lt lockType) error {
    	// Per https://golang.org/issue/19098, “Programs currently expect the Fd
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 17 02:24:35 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  9. .teamcity/src/main/kotlin/promotion/BasePromotionBuildType.kt

                // we only allow 1 promotion job running at the same time to avoid website xml conflicts
                feature {
                    type = "JetBrains.SharedResources"
                    param("locks-param", "WebsiteReleasesXml writeLock")
                }
            }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 24 03:34:53 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

          this.writeLock = new CycleDetectingReentrantWriteLock(this);
          this.lockGraphNode = Preconditions.checkNotNull(lockGraphNode);
        }
    
        ///// Overridden ReentrantReadWriteLock methods. /////
    
        @Override
        public ReadLock readLock() {
          return readLock;
        }
    
        @Override
        public WriteLock writeLock() {
          return writeLock;
        }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Dec 15 19:31:54 UTC 2023
    - 35.9K bytes
    - Viewed (0)
Back to top