mirror of https://github.com/golang/go.git
Lock mutex when selecting destination test
This commit is contained in:
parent
aec3488db9
commit
18af0e1526
|
|
@ -1035,6 +1035,9 @@ func (c *common) log(s string) {
|
|||
// destination selects the test to which output should be appended. It returns the
|
||||
// test if it is incomplete. Otherwise, it finds its closest incomplete parent.
|
||||
func (c *common) destination() *common {
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
|
||||
if !c.done {
|
||||
return c
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue