- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 1,230 for unlock2 (0.22 sec)
-
src/sync/rwmutex_test.go
} if m.TryRLock() { t.Fatalf("TryRLock succeeded with mutex locked") } m.Unlock() if !m.TryLock() { t.Fatalf("TryLock failed with mutex unlocked") } m.Unlock() if !m.TryRLock() { t.Fatalf("TryRLock failed with mutex unlocked") } if !m.TryRLock() { t.Fatalf("TryRLock failed with mutex rlocked") } if m.TryLock() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 29 17:13:13 UTC 2021 - 4.9K bytes - Viewed (0) -
internal/dsync/drwmutex_test.go
defer func() { if recover() == nil { t.Fatalf("unlock of unlocked RWMutex did not panic") } }() mu := NewDRWMutex(ds, "test") mu.Unlock(context.Background()) } // Borrowed from rwmutex_test.go func TestUnlockPanic2(t *testing.T) { mu := NewDRWMutex(ds, "test-unlock-panic-2") defer func() { if recover() == nil { t.Fatalf("unlock of unlocked RWMutex did not panic") }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0) -
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/lsync/lrwmutex.go
} } } // Unlock unlocks the write lock. // // It is a run-time error if lm is not locked on entry to Unlock. func (lm *LRWMutex) Unlock() { isWriteLock := true success := lm.unlock(isWriteLock) if !success { panic("Trying to Unlock() while no Lock() is active") } } // RUnlock releases a read lock held on lm. //
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 4.8K 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)