Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit 08c3756

Browse files
committed
try sync.Mutex
1 parent 360dcb6 commit 08c3756

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dep_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121

2222
var (
2323
exeSuffix string // ".exe" on Windows
24-
mu sync.RWMutex
24+
mu sync.Mutex
2525
)
2626

2727
func init() {
@@ -200,8 +200,8 @@ func (tg *testgoData) doRun(args []string) error {
200200
// run runs the test go command, and expects it to succeed.
201201
func (tg *testgoData) run(args ...string) {
202202
if runtime.GOOS == "windows" {
203-
mu.RLock()
204-
defer mu.RUnlock()
203+
mu.Lock()
204+
defer mu.Unlock()
205205
}
206206
if status := tg.doRun(args); status != nil {
207207
tg.t.Logf("go %v failed unexpectedly: %v", args, status)

0 commit comments

Comments
 (0)