MCPcopy Create free account
hub / github.com/egonelbre/exp / TestMutexOwn

Function TestMutexOwn

sync2/mutex_test.go:10–17  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestMutexOwn(t *testing.T) {
11 var mu sync2.Mutex
12 mu.Lock()
13 defer mu.Unlock()
14 if !mu.Own() {
15 t.Errorf("owning returned wrong result")
16 }
17}
18
19func TestMutexNotOwned(t *testing.T) {
20 var mu sync2.Mutex

Callers

nothing calls this directly

Calls 3

LockMethod · 0.95
UnlockMethod · 0.95
OwnMethod · 0.95

Tested by

no test coverage detected