We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2141cc7 commit cd56514Copy full SHA for cd56514
server/util_test.go
@@ -24,7 +24,7 @@ func BenchmarkParseSize(b *testing.B) {
24
}
25
26
27
-func deferUnlock(mu sync.Mutex) {
+func deferUnlock(mu *sync.Mutex) {
28
mu.Lock()
29
defer mu.Unlock()
30
@@ -33,11 +33,11 @@ func BenchmarkDeferMutex(b *testing.B) {
33
var mu sync.Mutex
34
b.SetBytes(1)
35
for i := 0; i < b.N; i++ {
36
- deferUnlock(mu)
+ deferUnlock(&mu)
37
38
39
40
-func noDeferUnlock(mu sync.Mutex) {
+func noDeferUnlock(mu *sync.Mutex) {
41
42
mu.Unlock()
43
@@ -46,6 +46,6 @@ func BenchmarkNoDeferMutex(b *testing.B) {
46
47
48
49
- noDeferUnlock(mu)
+ noDeferUnlock(&mu)
50
51
0 commit comments