Skip to content

Commit 87c7b65

Browse files
authored
Merge pull request #1134 from MeteorsLiu/fix-uninitiated-chan-mu
fix: uninitiated mutex
2 parents 71815a4 + 69b2bfd commit 87c7b65

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

runtime/internal/runtime/z_chan.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ func NewChan(eltSize, cap int) *Chan {
4848
ret.data = AllocU(uintptr(cap * eltSize))
4949
ret.cap = cap
5050
}
51+
ret.mutex.Init(nil)
5152
ret.cond.Init(nil)
5253
return ret
5354
}

0 commit comments

Comments
 (0)