Skip to content

golang内存模型第一个bug的例子 #30

@shscy

Description

@shscy

在这个例子中,如果buffered chan 的长度为1,是不会有bug的吧?我在本地使用go run -race运行也不会有任何报错,您是否把buffered chan的长度误写为1?如果不是,麻烦您能详细解释一下吗,谢谢。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions