- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 43 for writer_lock (0.17 sec)
-
src/internal/poll/fd_windows.go
return n, err } rawToSockaddrInet6(o.rsa, sa6) return n, err } // Write implements io.Writer. func (fd *FD) Write(buf []byte) (int, error) { if err := fd.writeLock(); err != nil { return 0, err } defer fd.writeUnlock() if fd.isFile { fd.l.Lock() defer fd.l.Unlock() } ntotal := 0 for len(buf) > 0 { b := buf if len(b) > maxRW { b = b[:maxRW] }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 31 16:50:42 UTC 2024 - 34.1K bytes - Viewed (0) -
src/internal/poll/copy_file_range_linux.go
// locks for both file descriptors (and why this whole machinery is // in the internal/poll package to begin with). if err := dst.writeLock(); err != nil { return 0, err } defer dst.writeUnlock() if err := src.readLock(); err != nil { return 0, err } defer src.readUnlock() var n int for { n, err = unix.CopyFileRange(src.Sysfd, nil, dst.Sysfd, nil, max, 0)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 17:40:10 UTC 2024 - 3.9K bytes - Viewed (0) -
src/os/file_plan9.go
// Since Plan 9 preserves message boundaries, never allow // a zero-byte write. func (f *File) write(b []byte) (n int, err error) { if err := f.writeLock(); err != nil { return 0, err } defer f.writeUnlock() if len(b) == 0 { return 0, nil } return fixCount(syscall.Write(f.fd, b)) } // pwrite writes len(b) bytes to the File starting at byte offset off.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 30 15:35:30 UTC 2024 - 16K bytes - Viewed (0) -
src/internal/poll/fd_plan9.go
err = ErrDeadlineExceeded } return n, err } // Write implements io.Writer. func (fd *FD) Write(fn func([]byte) (int, error), b []byte) (int, error) { if err := fd.writeLock(); err != nil { return 0, err } defer fd.writeUnlock() fd.wmu.Lock() if fd.wtimedout { fd.wmu.Unlock() return 0, ErrDeadlineExceeded } fd.waio = newAsyncIO(fn, b) fd.wmu.Unlock() n, err := fd.waio.Wait()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 14:00:54 UTC 2024 - 5.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/eventclock/fake.go
}, grc } // GetNextTime returns the next time at which there is work scheduled, // and a bool indicating whether there is any such time func (fec *Fake) GetNextTime() (time.Time, bool) { fec.waitersLock.RLock() defer fec.waitersLock.RUnlock() if len(fec.waiters) > 0 { return fec.waiters[0].targetTime, true } return time.Time{}, false } // Run runs all the events scheduled, and all the events they
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Dec 18 04:27:38 UTC 2022 - 7.9K bytes - Viewed (0) -
src/internal/poll/splice_linux.go
// all of it to the socket. This behavior is similar to the Write // step of an io.Copy in userspace. func splicePump(sock *FD, pipefd int, inPipe int) (int, error) { if err := sock.writeLock(); err != nil { return 0, err } defer sock.writeUnlock() if err := sock.pd.prepareWrite(sock.isFile); err != nil { return 0, err } written := 0 for inPipe > 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 21:49:26 UTC 2024 - 7.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java
private ReentrantReadWriteLock.ReadLock readLockB; private ReentrantReadWriteLock.ReadLock readLockC; private ReentrantReadWriteLock.WriteLock writeLockA; private ReentrantReadWriteLock.WriteLock writeLockB; private ReentrantReadWriteLock.WriteLock writeLockC; private ReentrantLock lock1; private ReentrantLock lock2; private ReentrantLock lock3; private ReentrantLock lock01;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 16.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java
private ReentrantReadWriteLock.ReadLock readLockB; private ReentrantReadWriteLock.ReadLock readLockC; private ReentrantReadWriteLock.WriteLock writeLockA; private ReentrantReadWriteLock.WriteLock writeLockB; private ReentrantReadWriteLock.WriteLock writeLockC; private ReentrantLock lock1; private ReentrantLock lock2; private ReentrantLock lock3; private ReentrantLock lock01;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 16.1K bytes - Viewed (0) -
internal/dsync/dsync-server_test.go
subrouter.Methods(http.MethodPost).Path("/v1/force-unlock").HandlerFunc(lockServer.ForceUnlockHandler) nodes[i] = httptest.NewServer(router) } } const WriteLock = -1 type lockServer struct { mutex sync.Mutex // Map of locks, with negative value indicating (exclusive) write lock // and positive values indicating number of read locks lockMap map[string]int64
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jan 23 16:46:37 UTC 2023 - 8.3K bytes - Viewed (0) -
src/cmd/go/internal/lockedfile/internal/filelock/filelock.go
// unspecified. // // Closing the file may or may not release the lock promptly. Callers should // ensure that Unlock is always called when Lock succeeds. func Lock(f File) error { return lock(f, writeLock) } // RLock places an advisory read lock on the file, blocking until it can be locked. // // If RLock returns nil, no other process will be able to place a write lock on
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 17 02:24:35 UTC 2023 - 2.6K bytes - Viewed (0)