Revision eeb3e8cd5e0d6e269575b51e2b8c462503c12c0b authored by Tom Hadlaw on 20 July 2024, 19:48:55 UTC, committed by Tom Hadlaw on 20 July 2024, 19:48:55 UTC
Signed-off-by: Tom Hadlaw <tom.hadlaw@isovalent.com>
1 parent acc80d2
semaphored_mutex_test.go
// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium
package lock
import (
"testing"
)
func TestSemaphoredMutex(t *testing.T) {
lock1 := NewSemaphoredMutex()
lock1.Lock()
lock1.Unlock()
lock1.RLock()
lock1.RUnlock()
lock2 := NewSemaphoredMutex()
lock2.Lock()
lock2.Unlock()
lock2.Lock()
lock2.UnlockToRLock()
lock2.RLock()
lock2.RLock()
lock2.RUnlock()
lock2.RUnlock()
lock2.RUnlock()
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...