- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 1,097 for unlock2 (0.17 sec)
-
src/runtime/rwmutex.go
rw.writer.set(m) unlock(&rw.rLock) notesleep(&m.park) noteclear(&m.park) }) } else { unlock(&rw.rLock) } } // unlock unlocks rw for writing. func (rw *rwmutex) unlock() { // Announce to readers that there is no active writer. r := rw.readerCount.Add(rwmutexMaxReaders) if r >= rwmutexMaxReaders { throw("unlock of unlocked rwmutex") } // Unblock blocked readers.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 14:29:04 UTC 2024 - 5K bytes - Viewed (0) -
src/cmd/go/internal/lockedfile/internal/filelock/filelock_fcntl.go
// P.1 locks file A. // Q.3 locks file B. // Q.3 blocks on file A. // P.2 blocks on file B. (This is erroneously reported as a deadlock.) // P.1 unlocks file A. // Q.3 unblocks and locks file A. // Q.3 unlocks files A and B. // P.2 unblocks and locks file B. // P.2 unlocks file B. // // These spurious errors were observed in practice on AIX and Solaris in // cmd/go: see https://golang.org/issue/32817. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 17 02:24:35 UTC 2023 - 5.5K bytes - Viewed (0) -
src/sync/rwmutex.go
// arrange for another goroutine to [RWMutex.RUnlock] ([RWMutex.Unlock]) it. func (rw *RWMutex) Unlock() { if race.Enabled { _ = rw.w.state race.Release(unsafe.Pointer(&rw.readerSem)) race.Disable() } // Announce to readers there is no active writer. r := rw.readerCount.Add(rwmutexMaxReaders) if r >= rwmutexMaxReaders { race.Enable() fatal("sync: Unlock of unlocked RWMutex") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 21:14:51 UTC 2024 - 7.2K bytes - Viewed (0) -
internal/dsync/drwmutex.go
// to indicate we haven't sufficiently unlocked lockers to avoid deadlocks. // // Caller may use this as an indication to call again. return !checkFailedUnlocks(*locks, tolerance) } // Unlock unlocks the write lock. // // It is a run-time error if dm is not locked on entry to Unlock. func (dm *DRWMutex) Unlock(ctx context.Context) { dm.m.Lock() dm.cancelRefresh() dm.m.Unlock()
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 19.7K bytes - Viewed (0) -
internal/lsync/lrwmutex_test.go
if recover() == nil { t.Fatalf("unlock of unlocked RWMutex did not panic") } }() mu := NewLRWMutex() mu.Unlock() } // Borrowed from rwmutex_test.go func TestUnlockPanic2(t *testing.T) { defer func() { if recover() == nil { t.Fatalf("unlock of unlocked RWMutex did not panic") } }() mu := NewLRWMutex() mu.RLock() mu.Unlock() } // Borrowed from rwmutex_test.go
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sun Mar 05 04:57:35 UTC 2023 - 7.9K bytes - Viewed (0) -
src/runtime/rwmutex_test.go
rwm.RLock() rwm.RLock() rwm.RUnlock() rwm.RUnlock() rwm.Lock() rwm.Unlock() } }) } func benchmarkRWMutex(b *testing.B, localWork, writeRatio int) { var rwm RWMutex rwm.Init() b.RunParallel(func(pb *testing.PB) { foo := 0 for pb.Next() { foo++ if foo%writeRatio == 0 { rwm.Lock() rwm.Unlock() } else { rwm.RLock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 15 22:00:45 UTC 2023 - 4.2K bytes - Viewed (0) -
internal/dsync/dsync-server_test.go
} l.mutex.Lock() defer l.mutex.Unlock() var locksHeld int64 if locksHeld, reply = l.lockMap[args.Resources[0]]; !reply { // No lock is held on the given name return false, fmt.Errorf("Unlock attempted on an unlocked entity: %s", args.Resources[0]) } if reply = locksHeld == WriteLock; !reply { // Unless it is a write lock
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/sync/mutex.go
if race.Enabled { race.Acquire(unsafe.Pointer(m)) } } // Unlock unlocks m. // It is a run-time error if m is not locked on entry to Unlock. // // A locked [Mutex] is not associated with a particular goroutine. // It is allowed for one goroutine to lock a Mutex and then // arrange for another goroutine to unlock it. func (m *Mutex) Unlock() { if race.Enabled { _ = m.state race.Release(unsafe.Pointer(m))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 21:14:51 UTC 2024 - 8.4K bytes - Viewed (0) -
pkg/scheduler/framework/runtime/waiting_pods_map.go
m.mu.Lock() defer m.mu.Unlock() m.pods[wp.GetPod().UID] = wp } // remove a WaitingPod from the map. func (m *waitingPodsMap) remove(uid types.UID) { m.mu.Lock() defer m.mu.Unlock() delete(m.pods, uid) } // get a WaitingPod from the map. func (m *waitingPodsMap) get(uid types.UID) *waitingPod { m.mu.RLock() defer m.mu.RUnlock() return m.pods[uid] }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 17 09:07:27 UTC 2024 - 4.5K bytes - Viewed (0) -
src/syscall/forkpipe2.go
// acquired by acquireForkLock. func releaseForkLock() { forkingLock.Lock() defer forkingLock.Unlock() if forking <= 0 { panic("syscall.releaseForkLock: negative count") } forking-- if forking == 0 { // No more conceptual write locks. ForkLock.Unlock() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jul 10 19:19:59 UTC 2023 - 2.6K bytes - Viewed (0)